-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (43 loc) · 848 Bytes
/
docker-compose.yml
File metadata and controls
44 lines (43 loc) · 848 Bytes
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
services:
app:
build:
context: .
dockerfile: Dockerfile
command: fastapi dev main.py --host 0.0.0.0 --port 8000
ports:
- "8000:8000"
- "8081:8081"
env_file:
- .env
depends_on:
- db
volumes:
- ./app:/fast-api/app
worker:
build:
context: .
dockerfile: Dockerfile
command: celery -A worker.celery worker --loglevel=info
env_file:
- .env
depends_on:
- db
volumes:
- ./app:/fast-api/app
redis:
image: "bitnami/redis:latest"
container_name: redis
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- "6379:6379"
db:
image: postgres:17
env_file:
- .env
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data # เก็บข้อมูล DB
volumes:
pgdata: