-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
53 lines (48 loc) · 1015 Bytes
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
services:
backend:
build:
context: .
dockerfile: Dockerfile
image: fastapi-kickstart
container_name: backend
ports:
- "8000:8000"
env_file:
.env
depends_on:
- db
volumes:
- .:/app
db:
image: postgres:15.2-alpine
container_name: postgres_db
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
redis:
image: redis:latest
container_name: redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
celery:
container_name: celery_worker
image: fastapi-kickstart
build:
context: .
dockerfile: Dockerfile
command: ["celery", "-A", "src.celery_config.celery_app", "worker", "--loglevel=info"]
depends_on:
- redis
- backend
env_file:
- .env
volumes:
postgres_data:
redis_data: