-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
202 lines (190 loc) · 5.35 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
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
x-netbox: &netbox
build:
context: docker/netbox
dockerfile: Dockerfile
depends_on:
- postgres
- redis
env_file: ./docker/netbox/netbox.env
user: "unit:root"
healthcheck:
start_period: 360s
timeout: 3s
interval: 15s
test: "curl -f http://localhost:8080/api/ || exit 1"
volumes:
- ./docker/netbox/configuration:/etc/netbox/config:z,ro
- ./docker/netbox/reports:/etc/netbox/reports:z,ro
- ./docker/netbox/scripts:/etc/netbox/scripts:z,ro
- ./docker/netbox/entrypoint.sh:/etc/netbox/entrypoint.sh
- netbox-media-files:/opt/netbox/netbox/media:z
- ./docker/netbox/data.json:/etc/netbox/data.json
services:
postgres:
image: "postgres:14"
ports:
- "5432:5432"
environment:
POSTGRES_USER: nwa
POSTGRES_PASSWORD: nwa
POSTGRES_DB: orchestrator-core
volumes:
- db-data:/var/lib/postgresql/data/
- ./docker/postgresql/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test:
[
"CMD",
"pg_isready",
"--username",
"nwa",
"--dbname",
"orchestrator-core",
]
interval: "3s"
timeout: "2s"
retries: 20
start_period: "5s"
redis:
image: docker.io/redis:7-alpine
command:
- sh
- -c # this is to evaluate the $REDIS_PASSWORD from the env
- redis-server --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose
healthcheck:
test: '[ $$(redis-cli --pass "$${REDIS_PASSWORD}" ping) = ''PONG'' ]'
start_period: 5s
timeout: 3s
interval: 1s
retries: 5
env_file: ./docker/redis/redis.env
volumes:
- netbox-redis-cache-data:/data
rover-compose:
build:
context: docker/federation
dockerfile: rover.Dockerfile
depends_on:
orchestrator-api:
condition: service_started
netbox:
condition: service_healthy
environment:
- APOLLO_ELV2_LICENSE=accept
- APOLLO_TELEMETRY_DISABLED=true
command: supergraph compose --config /app/supergraph-config.yaml --output /app/supergraph.graphql --skip-update-check
volumes:
- ./docker/federation:/app
federation:
image: ghcr.io/apollographql/router:v1.47.0
ports:
- "4000:4000"
depends_on:
rover-compose:
condition: service_completed_successfully
environment:
- APOLLO_TELEMETRY_DISABLED=true
command: --config /app/router-config.yaml --supergraph /app/supergraph.graphql
volumes:
- ./docker/federation:/app
netbox:
<<: *netbox
expose:
- "8080"
ports:
- "8000:8080"
entrypoint:
["/opt/netbox/docker-entrypoint.sh", "/etc/netbox/entrypoint.sh"]
netbox-worker:
<<: *netbox
depends_on:
netbox:
condition: service_healthy
command:
- /opt/netbox/venv/bin/python
- /opt/netbox/netbox/manage.py
- rqworker
healthcheck:
start_period: 20s
timeout: 3s
interval: 15s
test: "ps -aux | grep -v grep | grep -q rqworker || exit 1"
netbox-housekeeping:
<<: *netbox
depends_on:
netbox:
condition: service_healthy
command:
- /opt/netbox/housekeeping.sh
healthcheck:
start_period: 20s
timeout: 3s
interval: 15s
test: "ps -aux | grep -v grep | grep -q housekeeping || exit 1"
orchestrator-ui:
image: "ghcr.io/workfloworchestrator/example-orchestrator-ui:2.14.0"
env_file: ./docker/orchestrator-ui/orchestrator-ui.env
ports:
- "3000:3000"
depends_on:
orchestrator-api:
condition: service_started
orchestrator-api:
image: "ghcr.io/workfloworchestrator/orchestrator-core:latest"
env_file: ./docker/orchestrator/orchestrator.env
environment:
LSO_ENABLED: ${COMPOSE_PROFILES:+True}
ports:
- "8080:8080"
- "5678:5678" #Enable Python debugger
expose:
- 5678 #Enable Python debugger
volumes:
- ./workflows:/home/orchestrator/workflows
- ./products:/home/orchestrator/products
- ./migrations:/home/orchestrator/migrations
- ./docker:/home/orchestrator/etc
- ./main.py:/home/orchestrator/main.py
- ./settings.py:/home/orchestrator/settings.py
- ./graphql_federation.py:/home/orchestrator/graphql_federation.py
- ./utils:/home/orchestrator/utils
- ./services:/home/orchestrator/services
- ./requirements.txt:/home/orchestrator/requirements.txt
- ./alembic.ini:/home/orchestrator/alembic.ini
- ./translations:/home/orchestrator/translations
- ./templates:/home/orchestrator/templates
entrypoint: ["/home/orchestrator/etc/orchestrator/entrypoint.sh"]
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
lso:
image: orchestrator-lso
profiles:
- lso
build:
context: ./docker/lso/
dockerfile: Dockerfile
env_file: ./docker/lso/lso.env
ports:
- "8001:8000"
volumes:
- ./ansible/plays_and_roles:/app/wfo/ansible
- ./ansible/inventory:/opt/ansible_inventory
nginx:
image: "nginx:1.27-alpine"
ports:
- "80:80"
volumes:
- "./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro"
restart: always
volumes:
netbox-media-files:
driver: local
db-data:
driver: local
netbox-redis-data:
driver: local
netbox-redis-cache-data:
driver: local