Skip to content

Commit

Permalink
Werking on deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhomak committed Mar 5, 2024
1 parent e76472f commit aa94d80
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/prod_server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and deploy rust graphql server
on:
push:
branches:
- main

env:
SQLX_OFFLINE: true

jobs:
build:
runs-on: self-hosted
environment: prod

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Build and test code
run: |
cargo build --release
- name: Deploy
run: |
cd ~
docker-compose down
docker-compose pull
docker-compose up -d
1 change: 0 additions & 1 deletion cookingd-front/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { DefaultApolloClient } from '@vue/apollo-composable'
import { createPinia } from 'pinia'
import createUploadLink from "apollo-upload-client/createUploadLink.mjs";
import { useUserStore } from '@/stores/useUserStore'
import process from 'process'

const cache = new InMemoryCache()

Expand Down
3 changes: 2 additions & 1 deletion cookingd-server/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ services:
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "5432:5432"

volumes:
- db:/var/lib/postgresql/data

volumes:
db:
Expand Down

0 comments on commit aa94d80

Please sign in to comment.