Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #281

Merged
merged 1 commit into from
Sep 5, 2023
Merged

fix #281

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/workflows/deploy-bot-on-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,10 @@ jobs:
docker system prune --force

# Installing defend service for app
# Шаг с копированием в строках 16-23 можно заменить командой ниже - нужно тестировать
# scp infra/dev/spread_wings_bot.service ${{ secrets.VM_USER }}@${{ secrets.VM_HOST }}:/spread_wings_bot/infra/dev/
sudo cp -f /home/deploy/spread_wings_bot/infra/dev/spread_wings_bot.service /etc/systemd/system/spread_wings_bot.service
sudo systemctl daemon-reload
sudo systemctl restart spread_wings_bot.service

# Installing the app
docker-compose -f docker-compose.stage.yaml stop
docker-compose -f docker-compose.stage.yaml pull
docker-compose -f docker-compose.stage.yaml up -d

# Applying initialization commands
docker exec spread-wings-bot python manage.py migrate
docker exec spread-wings-bot python manage.py collectstatic --noinput
8 changes: 4 additions & 4 deletions infra/dev/docker-compose.stage.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.stage.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
Loading