Skip to content

Commit

Permalink
chore(compose): pass envs to docker compose on starting
Browse files Browse the repository at this point in the history
  • Loading branch information
Adibov committed Nov 28, 2023
1 parent f32dbde commit efe99ea
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Deploy

on:
push:
branches:
- master
# branches:
# - master

jobs:
build-and-push:
Expand Down Expand Up @@ -45,10 +45,14 @@ jobs:

- name: Deploy to the VM
uses: appleboy/ssh-action@master
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
EMAIL_HOST_PASSWORD: ${{ secrets.EMAIL_HOST_PASSWORD }}
ZIFY_AUTH: ${{ secrets.ZIFY_AUTH }}
with:
host: ${{ vars.VM_HOST }}
username: ${{ vars.VM_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
# TODO: handle envs
envs: SECRET_KEY,EMAIL_HOST_PASSWORD,ZIFY_AUTH
script: |
docker compose -f AAISS-2023/docker-compose.yml up -d --pull always --force-recreate --no-build
3 changes: 2 additions & 1 deletion backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.git
data
media
static
static
.env
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ services:
cache_from:
- aaissaut/aaiss:backend
command: gunicorn aaiss_backend.wsgi:application --bind 0.0.0.0:6446
environment:
SECRET_KEY: ${BACKEND_SECRET_KEY}
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
ZIFY_AUTH: ${ZIFY_AUTH}
volumes:
- ./backend/data:/backend-aaiss/data
- ./backend/static:/backend-aaiss/static
Expand Down
3 changes: 2 additions & 1 deletion frontend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.gitignore
README.md
dist
node_modules
node_modules
.env

0 comments on commit efe99ea

Please sign in to comment.