diff --git a/.github/workflows/deploy-bot-on-prod.yml b/.github/workflows/deploy-bot-on-prod.yml index 8efd1c9..ebf8dd1 100644 --- a/.github/workflows/deploy-bot-on-prod.yml +++ b/.github/workflows/deploy-bot-on-prod.yml @@ -70,9 +70,6 @@ jobs: echo EMAIL_PASSWORD=${{ secrets.EMAIL_PASSWORD }} >> .env echo EMAIL_PORT=${{ secrets.EMAIL_PORT }} >> .env - echo DJANGO_SUPERUSER_EMAIL=${{ secrets.DJANGO_SUPERUSER_EMAIL }} >> .env - echo DJANGO_SUPERUSER_PASSWORD=${{ secrets.DJANGO_SUPERUSER_PASSWORD }} >> .env - # Cleaning unused containers, images, networks docker system prune --force @@ -81,11 +78,7 @@ jobs: sudo systemctl daemon-reload sudo systemctl restart spread_wings_bot_prod.service - # Installing the app - docker-compose -f docker-compose.prod.yaml stop - docker-compose -f docker-compose.prod.yaml pull - docker-compose -f docker-compose.prod.yaml up -d - # Applying initialization commands + sleep 7 docker exec spread-wings-bot python manage.py migrate docker exec spread-wings-bot python manage.py collectstatic --noinput diff --git a/.github/workflows/deploy-bot-on-stage.yml b/.github/workflows/deploy-bot-on-stage.yml index dceba99..f6b402e 100644 --- a/.github/workflows/deploy-bot-on-stage.yml +++ b/.github/workflows/deploy-bot-on-stage.yml @@ -70,9 +70,6 @@ jobs: echo EMAIL_PASSWORD=${{ secrets.EMAIL_PASSWORD }} >> .env echo EMAIL_PORT=${{ secrets.EMAIL_PORT }} >> .env - echo DJANGO_SUPERUSER_EMAIL=${{ secrets.DJANGO_SUPERUSER_EMAIL }} >> .env - echo DJANGO_SUPERUSER_PASSWORD=${{ secrets.DJANGO_SUPERUSER_PASSWORD }} >> .env - # Cleaning unused containers, images, networks docker system prune --force diff --git a/infra/prod/docker-compose.prod.yaml b/infra/prod/docker-compose.prod.yaml index 15d4ba9..9c82126 100644 --- a/infra/prod/docker-compose.prod.yaml +++ b/infra/prod/docker-compose.prod.yaml @@ -18,7 +18,7 @@ services: volumes: - ./redis.conf:/usr/local/etc/redis.conf - data_value:/data - - ./logs/redis/:/var/log/ + - ../../logs/redis/:/var/log/ networks: - spread-wings-network @@ -33,7 +33,7 @@ services: - "5432:5432" volumes: - db_data:/var/lib/postgresql/data - - ./logs/db/:/var/log/postgres + - ../../logs/db/:/var/log/postgres restart: always networks: - spread-wings-network @@ -47,7 +47,7 @@ services: volumes: - ../../static:/app/src/staticfiles - ../../media:/app/src/media - - ./logs/bot/:/app/src/logs + - ../../logs/bot/:/app/src/logs restart: always env_file: - ./.env @@ -63,7 +63,7 @@ services: - ./nginx.prod.conf.template:/etc/nginx/templates/default.conf.template - ../../static:/var/html/static/ - ../../media:/var/html/media/ - - ./logs/nginx/:/var/log/nginx/ + - ../../logs/nginx/:/var/log/nginx/ env_file: - ./.env depends_on: