Skip to content

Commit

Permalink
ci: Split up the backend's deploy commands
Browse files Browse the repository at this point in the history
  • Loading branch information
drikusroor committed Feb 5, 2024
1 parent f8d407d commit 6134593
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/podman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ jobs:
- uses: actions/checkout@v4
- name: Build Podman images
run: podman-compose -f docker-compose-deploy.yml build
- name: Apply Django migrations
run: podman-compose -f docker-compose-deploy.yml run --rm web python manage.py migrate --noinput
- name: Run custom Django bootstrap management command
run: podman-compose -f docker-compose-deploy.yml run --rm web python manage.py bootstrap
- name: Collect static files
run: podman-compose -f docker-compose-deploy.yml run --rm web python manage.py collectstatic --noinput
- name: Deploy Podman images
run: podman-compose -f docker-compose-deploy.yml up -d --force-recreate
- name: Check Podman images
run: podman-compose -f docker-compose-deploy.yml ps
- name: Check logs
run: podman-compose -f docker-compose-deploy.yml logs
- name: Check if Django's superuser environment variables are set
run: echo $DJANGO_SUPERUSER_USERNAME $DJANGO_SUPERUSER_PASSWORD $DJANGO_SUPERUSER_EMAIL
run: podman-compose -f docker-compose-deploy.yml logs
2 changes: 1 addition & 1 deletion docker-compose-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ services:
- SQL_HOST=${SQL_HOST}
ports:
- 8000:8000
command: bash -c "python manage.py migrate && python manage.py bootstrap && python manage.py runserver 0.0.0.0:8000"
command: gunicorn aml.wsgi:application --bind 0.0.0.0:8000
client-builder:
build:
context: ./frontend
Expand Down

0 comments on commit 6134593

Please sign in to comment.