forked from shuttle-hq/shuttle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
125 lines (114 loc) · 3.16 KB
/
docker-compose.dev.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
version: "3"
volumes:
logger-postgres-vol:
control-db-postgres-vol:
services:
provisioner:
entrypoint:
- /bin/bash
- -c
- |
until </dev/tcp/postgres/5432
do
>&2 echo "PG is not available yet - sleeping"
sleep 1
done
until </dev/tcp/mongodb/27017
do
>&2 echo "mongoDB is not available yet - sleeping"
sleep 1
done
>&2 echo "DBs are available - starting provisioner"
exec /usr/local/bin/shuttle-provisioner "$${@:0}"
ports:
- 3000:8000
resource-recorder:
ports:
- 8007:8000
depends_on:
- control-db
entrypoint:
- /bin/bash
- -c
- |
until </dev/tcp/control-db/5432
do
>&2 echo "The control DB is not available yet - sleeping"
sleep 1
done
>&2 echo "The control DB is available - starting shuttle-resource-recorder"
exec /usr/local/bin/shuttle-resource-recorder "$${@:0}"
auth:
depends_on:
- control-db
entrypoint:
- /bin/bash
- -c
- |
until </dev/tcp/control-db/5432
do
>&2 echo "The control DB is not available yet - sleeping"
sleep 1
done
>&2 echo "The control DB is available - starting shuttle-auth"
exec /usr/local/bin/shuttle-auth "$${@:0}"
command:
- "--db-connection-uri=${CONTROL_DB_POSTGRES_URI}"
- "start"
- "--address=0.0.0.0:8000"
- "--stripe-secret-key=${STRIPE_SECRET_KEY}"
# used only for local development
- "--jwt-signing-private-key=LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1DNENBUUF3QlFZREsyVndCQ0lFSUR5V0ZFYzhKYm05NnA0ZGNLTEwvQWNvVUVsbUF0MVVKSTU4WTc4d1FpWk4KLS0tLS1FTkQgUFJJVkFURSBLRVktLS0tLQo="
- "--permit-api-uri=https://api.eu-central-1.permit.io"
- "--permit-pdp-uri=http://permit-pdp:7000"
- "--permit-env=${SHUTTLE_ENV}"
- "--permit-api-key=${PERMIT_API_KEY}"
otel-collector:
ports:
- 4317:4317
logger:
ports:
- 8010:8000
depends_on:
- auth
- logger-postgres
entrypoint:
- /bin/bash
- -c
- |
until </dev/tcp/logger-postgres/5432
do
>&2 echo "PG is not available yet - sleeping"
sleep 1
done
>&2 echo "DBs are available - starting shuttle-logger"
exec /usr/local/bin/shuttle-logger "$${@:0}"
logger-postgres:
image: "docker.io/library/postgres:${LOGGER_POSTGRES_TAG}"
restart: always
networks:
user-net:
environment:
POSTGRES_PASSWORD: ${LOGGER_POSTGRES_PASSWORD}
volumes:
- logger-postgres-vol:/var/lib/postgresql/data
ports:
- 8003:8000
# the shared postgres already uses 5432
- 5433:5432
control-db:
image: "docker.io/library/postgres:${CONTROL_DB_POSTGRES_TAG}"
restart: always
networks:
user-net:
environment:
POSTGRES_PASSWORD: ${CONTROL_DB_POSTGRES_PASSWORD}
volumes:
- control-db-postgres-vol:/var/lib/postgresql/data
ports:
- 8004:8000
# the shared postgres already uses 5432
- 5434:5432
permit-pdp:
environment:
- PDP_DEBUG=True