diff --git a/.github/workflows/podman.yml b/.github/workflows/podman.yml index ac4a845eb..83ed8c2b6 100644 --- a/.github/workflows/podman.yml +++ b/.github/workflows/podman.yml @@ -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 \ No newline at end of file + run: podman-compose -f docker-compose-deploy.yml logs \ No newline at end of file diff --git a/docker-compose-deploy.yml b/docker-compose-deploy.yml index dc0f29c98..738ce0f77 100644 --- a/docker-compose-deploy.yml +++ b/docker-compose-deploy.yml @@ -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