Skip to content

Commit

Permalink
fix: static build release
Browse files Browse the repository at this point in the history
  • Loading branch information
fivehanz committed Aug 4, 2024
1 parent ed2478b commit 1e0ad8e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions deployment/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ services:
- .env
command: "granian --interface wsgi hanz.wsgi:application --host 0.0.0.0 --port 8000 \
--workers 2 --threads 2 --log-level info"

static_build:
build:
context: ../../
dockerfile: Dockerfile
container_name: hanz_prod_static_build
networks:
- hanz-nw
depends_on:
- db
- redis
environment:
- DATABASE_URL=postgres://user:dbpassword@db:5432/hanz-db
- REDIS_URL=redis://redis:6379/1
env_file:
- .env
volumes:
- ./static:/app/src/static/
command: "poetry run python manage.py collectstatic --noinput --clear && \
poetry run python manage.py collectstatic --noinput && \
poetry run python manage.py compress --force"

db:
image: postgres:15-alpine
Expand Down

0 comments on commit 1e0ad8e

Please sign in to comment.