forked from sylvoslee/timeflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yaml
71 lines (66 loc) · 1.62 KB
/
docker-compose-dev.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
version: '3'
networks:
static-network:
ipam:
driver: default
config:
- subnet: 172.28.0.0/16
services:
db:
image: postgres
restart: always
ports:
- 5432:5432
environment:
POSTGRES_DB: test_db
POSTGRES_USER: pguser
POSTGRES_PASSWORD: password
networks:
static-network:
ipv4_address: 172.28.1.3
pgadmin:
image: dpage/pgadmin4
restart: always
ports:
- 5433:80
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: password
networks:
static-network:
ipv4_address: 172.28.1.4
fastapi:
image: fastapi:v1
volumes:
- ./backend/:/backend/
command: >
bash -c "rm -f backend/database.sqlite && export TIMEFLOW_DEV=true && 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:
#python3 /applications/main2.py && ls
image: idom:v1
volumes:
- ./:/applications
command: >
bash -c "export TIMEFLOW_DEV=true && cd /applications && uvicorn main:app --workers 1 --host 0.0.0.0 --port 8001 --reload --ssl-keyfile certs/127.0.0.1-key.pem --ssl-certfile certs/127.0.0.1.pem --access-log"
ports:
- 8001:8001
depends_on:
- "db"
env_file:
- .env
container_name: applications
networks:
static-network:
ipv4_address: 172.28.1.1