-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
116 lines (104 loc) · 2.56 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
version: "3.9"
services:
postgres:
image: postgres:13-alpine
ports:
- "127.0.0.1:5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: featureflags
volumes:
- "pg-data:/var/lib/postgresql/data"
- "./seeds:/var/lib/postgresql/seeds"
networks:
- main
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-d", "featureflags" ]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
postgres-test:
image: postgres:13-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: featureflags-test
networks:
- main
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-d", "featureflags-test" ]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
backend: &backend
image: featureflags-server-dev
init: true
tty: true
stdin_open: true
environment: &env
LANG: C.UTF-8
LC_ALL: C.UTF-8
PYTHONIOENCODING: UTF-8
PYTHONUNBUFFERED: 1
CONFIG_PATH: configs/local.yaml
PGUSER: postgres
PGPASS: postgres
SECRET: 023517f06f444118986877e636b4a226
networks:
- main
volumes:
- ./featureflags:/app/featureflags
- ./scripts:/app/scripts
- ./configs:/app/configs
- ./.ipython:/app/.ipython
- ./README.md:/app/README.md
web:
<<: *backend
depends_on:
postgres:
condition: service_healthy
ports:
- "127.0.0.1:8000:8000"
command: pdm run watchfiles --filter python "python3 -m featureflags web" featureflags
rpc:
<<: *backend
depends_on:
postgres:
condition: service_healthy
ports:
- "127.0.0.1:50051:50051"
command: pdm run watchfiles --filter python "python3 -m featureflags rpc" featureflags
http:
<<: *backend
depends_on:
postgres:
condition: service_healthy
ports:
- "127.0.0.1:8080:8080"
command: pdm run watchfiles --filter python "python3 -m featureflags http" featureflags
ishell:
<<: *backend
command: pdm run ipython --ipython-dir=/app/.ipython
test:
<<: *backend
image: featureflags-server-test
environment:
<<: *env
CONFIG_PATH: configs/test.yaml
depends_on:
postgres-test:
condition: service_healthy
command: pdm run test ${ARGS}
docs:
<<: *backend
image: featureflags-server-docs
command: sphinx-build -a -b html docs public
volumes:
pg-data:
driver: local
networks:
main:
driver: bridge