forked from sylvoslee/timeflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
74 lines (70 loc) · 1.7 KB
/
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: '3'
networks:
static-network:
ipam:
driver: default
config:
- subnet: 172.28.0.0/16
services:
db:
image: postgres:14
env_file:
- .env
ports:
- ${POSTGRE_PORT}:5432
volumes:
- db-data:/var/lib/postgresql/data
restart: unless-stopped
environment:
POSTGRES_PASSWORD: ${POSTGRE_PASS}
POSTGRES_USER: ${POSTGRE_USER}
POSTGRES_DB: ${POSTGRE_DB}
networks:
static-network:
ipv4_address: 172.28.1.3
pgadmin:
image: dpage/pgadmin4
restart: always
ports:
- 5433:80
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
networks:
static-network:
ipv4_address: 172.28.1.4
fastapi:
image: fastapi:v1
volumes:
- ./backend/:/backend/
command: bash -c "export TIMEFLOW_DEV=false && uvicorn backend.main:app --reload --port 8002 --host 0.0.0.0"
ports:
- 8002:8002
depends_on:
- "db"
env_file:
- .env
container_name: fastapi
stdin_open: true # docker run -i
tty: true # docker run -t
networks:
static-network:
ipv4_address: 172.28.1.2
applications:
image: idom:v1
volumes:
- ./:/applications
command: >
bash -c "export TIMEFLOW_DEV=false && cd /applications && uvicorn main:app --workers 1 --host 0.0.0.0 --port 8001 --reload --access-log"
ports:
- 8001:8001
depends_on:
- "db"
env_file:
- .env
container_name: applicationscd
networks:
static-network:
ipv4_address: 172.28.1.1
volumes:
db-data: