-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
65 lines (59 loc) · 1.18 KB
/
docker-compose.yaml
File metadata and controls
65 lines (59 loc) · 1.18 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
version: "3.7"
# For local development, only database is running
#
# docker-compose up -d
# uvicorn app.main:app --reload
#
services:
db:
restart: always
image: postgres
container_name: db
hostname: db
volumes:
- ${POSTGRES_HOME_DIR}/data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${DEFAULT_DATABASE_DB}
- POSTGRES_USER=${DEFAULT_DATABASE_USER}
- POSTGRES_PASSWORD=${DEFAULT_DATABASE_PASSWORD}
env_file:
- .env
ports:
- "${DEFAULT_DATABASE_PORT}:5432"
networks:
- backend
api:
build:
context: .
dockerfile: docker/api/Dockerfile
args:
USER_ID: $USER_ID
GROUP_ID: $GROUP_ID
USER_NAME: "$API_CONTAINER_USER_NAME"
ostype: "Mac"
container_name: api
hostname: api
volumes:
- ./:/home
env_file:
- .env
tty: true
ports:
- "8000:8000"
networks:
- backend
depends_on:
- db
redis:
build:
context: .
dockerfile: docker/redis/Dockerfile
container_name: redis
hostname: redis
ports:
- '6379:6379'
networks:
- backend
networks:
backend:
driver: 'bridge'