-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
37 lines (36 loc) · 1.04 KB
/
docker-compose.yml
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
# docker-compose.yml
version: '3'
services:
postgres:
image: postgres:13
environment:
- POSTGRES_DB=developer
- POSTGRES_USER=developer
- POSTGRES_PASSWORD=devpassword
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "127.0.0.1:25000:5432"
redis:
image: redis:latest
ports:
- "127.0.0.1:25100:6379"
command: redis-server --save ""
fastapi:
build:
environment:
- APP_ENV=DEV
- RDB_USER=developer
- RDB_PASSWORD=devpassword
- RDB_HOST=postgres # 서비스명
- RDB_PORT=5432
- RDB_NAME=developer
- SECRET_KEY=86568bc5f67e52396bc7e7ce67789e6e50aaeb3951f7ef0692d546f7f9439aae
- REDIS_HOST=redis # 서비스 명
- REDIS_PORT=6379
ports:
- "127.0.0.1:8000:8000"
command: uvicorn main:app --host 0.0.0.0 --port 8000 --workers 4
volumes:
postgres-data:
driver: local