Skip to content

Commit

Permalink
chore: prod celery update
Browse files Browse the repository at this point in the history
  • Loading branch information
fivehanz committed Aug 19, 2024
1 parent 61645ba commit 9bf5ebe
Showing 1 changed file with 39 additions and 3 deletions.
42 changes: 39 additions & 3 deletions deployment/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ services:
- GID=${GID:-1000}
env_file:
- .env
command: "granian --interface wsgi hanz.wsgi:application --host 0.0.0.0 --port 8000 \
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: ../../
Expand All @@ -44,6 +45,42 @@ services:
volumes:
- ../../static:/app/src/static/

celery_worker:
container_name: hanz_celery_worker
build:
context: .
dockerfile: Dockerfile
command: celery -A hanz worker -l error
environment:
- DATABASE_URL=postgres://user:dbpassword@db:5432/hanz-db
- UID=${UID:-1000}
- GID=${GID:-1000}
env_file:
- .env
networks:
- hanz-nw
depends_on:
- db
- redis

celery_beat:
container_name: hanz_celery_beat
build:
context: .
dockerfile: Dockerfile
command: celery -A hanz beat -l error
environment:
- DATABASE_URL=postgres://user:dbpassword@db:5432/hanz-db
- UID=${UID:-1000}
- GID=${GID:-1000}
env_file:
- .env
networks:
- hanz-nw
depends_on:
- db
- redis

db:
image: postgres:15-alpine
container_name: hanz_prod_postgres_db
Expand All @@ -66,7 +103,6 @@ services:
networks:
- hanz-nw


networks:
hanz-nw:
driver: bridge
Expand Down

0 comments on commit 9bf5ebe

Please sign in to comment.