-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
122 lines (110 loc) · 3.6 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
version: '3'
name: e2esdk-examples-contact-forms
services:
# Application layer --
app-db:
image: postgres:14.1
ports:
- '4001:5432'
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_DB=app
volumes:
- ../../../.volumes/docker/$COMPOSE_PROJECT_NAME/app-db:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 1s
start_period: 3s
retries: 50
app-hasura:
build: ./src/hasura
env_file: ./src/hasura/.env
restart: unless-stopped
ports:
- '4002:8080'
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
app-db:
condition: service_healthy
# e2esdk --
e2esdk-db:
image: postgres:14.1
ports:
- '4004:5432'
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_DB=e2esdk
volumes:
- ../../../.volumes/docker/$COMPOSE_PROJECT_NAME/e2esdk-db:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 1s
start_period: 3s
retries: 50
# e2esdk-verify-image-signature:
# image: ghcr.io/socialgouv/e2esdk/server:beta
# command: packages/server/node_modules/.bin/sceau verify --packageDir packages/server --strict
e2esdk-db-ops:
#image: ghcr.io/socialgouv/e2esdk/server:beta
build:
context: ../../../
dockerfile: ./packages/server/Dockerfile
environment:
- POSTGRESQL_URL=postgres://postgres:password@e2esdk-db:5432/e2esdk
command: pnpm db migrations apply
links:
- e2esdk-db
depends_on:
e2esdk-db:
condition: service_healthy
e2esdk-redis:
image: redis:7
command: redis-server --appendonly yes
ports:
- '4005:6379'
volumes:
- ../../../.volumes/docker/$COMPOSE_PROJECT_NAME/e2esdk-redis:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli -h 127.0.0.1 ping | grep 'PONG' || exit 1"]
interval: 1s
start_period: 3s
retries: 10
e2esdk-server:
#image: ghcr.io/socialgouv/e2esdk/server:beta
build:
context: ../../../
dockerfile: ./packages/server/Dockerfile
ports:
- '4003:3000'
volumes:
- ../../../config/certs:/app/packages/server/certs
environment:
- DEPLOYMENT_TAG=local
- DEPLOYMENT_URL=https://localhost:4003
- POSTGRESQL_URL=postgres://postgres:password@e2esdk-db:5432/e2esdk
- REDIS_URL=redis://e2esdk-redis:6379
- SIGNATURE_PUBLIC_KEY=gsE7B63ETtNDIzAwXEp3X1Hv12WCKGH6h7brV3U9NKE
- SIGNATURE_PRIVATE_KEY=___examples-server-signkey__NOT-FOR-PROD__yCwTsHrcRO00MjMDBcSndfUe_XZYIoYfqHtutXdT00oQ
- CORS_ALLOWED_ORIGINS=http://localhost:4000
- DISABLE_CODE_SIGNATURE_CHECK=true
- SESSION_SECRETS=___example-session-key_____NOT-FOR-PROD___8
- OPAQUE_SERVER_SETUP=y9nWjEF_GxEaTZIX8LXR8ssOuC5RJcTc5XN73WGnzN1DdksCf4VhhH7mkqC48UFBeQtCBY_77akTivYOoGTyoLLMm_1GTMPLaYSt_tvbHuGQI_xhCFjA9bBJ0fONA8QINH6rxlX0oG9lApZ65AIC5l7Q1A9YdoFh-stB81Uk7Q0
links:
- e2esdk-db
- e2esdk-redis
depends_on:
e2esdk-db:
condition: service_healthy
e2esdk-redis:
condition: service_healthy
# e2esdk-verify-image-signature:
# condition: service_completed_successfully
e2esdk-db-ops:
condition: service_completed_successfully
healthcheck:
# Here we add `--insecure` to allow CURLing against
# local TLS certificates generated by mkcert.
# Obviously, don't do this in production!
# (the default healthcheck will check the CA chain)
test: curl --fail --insecure https://localhost:3000/_health || exit 1