Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
KonstantinRaikhert committed Sep 7, 2023
1 parent fca7117 commit 9fcac05
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/deploy-bot-on-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
3 changes: 0 additions & 3 deletions .github/workflows/deploy-bot-on-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions infra/prod/docker-compose.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 9fcac05

Please sign in to comment.