Skip to content

Commit

Permalink
Merge pull request #79 from Pet-projects-CodePET/dev_docker
Browse files Browse the repository at this point in the history
Dev docker
  • Loading branch information
VladislavCR authored Feb 24, 2024
2 parents b5d40d4 + 83dfe7e commit f831997
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,5 @@ jobs:
sudo docker compose -f docker-compose-prod.yaml up -d
sudo docker compose -f docker-compose-prod.yaml exec backend python manage.py migrate
sudo docker compose -f docker-compose-prod.yaml exec backend python manage.py collectstatic --no-input
sudo docker compose -f docker-compose-prod.yaml exec backend cp -r static/. /backend_static/static/
sudo docker system prune -f
1 change: 1 addition & 0 deletions .github/workflows/qa_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,5 @@ jobs:
sudo docker compose -f docker-compose-prod.yaml up -d
sudo docker compose -f docker-compose-prod.yaml exec backend python manage.py migrate
sudo docker compose -f docker-compose-prod.yaml exec backend python manage.py collectstatic --no-input
sudo docker compose -f docker-compose-prod.yaml exec backend cp -r static/. /backend_static/static/
sudo docker system prune -f
7 changes: 5 additions & 2 deletions infra/docker-compose-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: '3'
volumes:
pg_data:
static_volume:
media_value:

services:
db:
Expand All @@ -19,7 +20,8 @@ services:
ports:
- "8000:8000"
volumes:
- static_volume:/backend_static
- static_volume:/backend_static/
- media_value:/backend_media/
depends_on:
- db

Expand All @@ -28,7 +30,8 @@ services:
ports:
- "80:80"
volumes:
- static_volume:/static
- static_volume:/staticfiles/
- media_value:/var/html/media/
- /etc/letsencrypt:/etc/letsencrypt
depends_on:
- backend
Expand Down
2 changes: 1 addition & 1 deletion src/backend/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@


STATIC_URL = "static/"
STATIC_ROOT = Path(BASE_DIR, "collected_static")
STATIC_ROOT = Path(BASE_DIR, "static")

MEDIA_URL = "media/"
MEDIA_ROOT = Path(BASE_DIR, "media")
Expand Down

0 comments on commit f831997

Please sign in to comment.