-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (70 loc) · 1.86 KB
/
docker-compose.yml
File metadata and controls
77 lines (70 loc) · 1.86 KB
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
name: resync
x-app-env: &app-env
OCAML_VERSION: 5.4.0
OPAM_SWITCH_NAME: linux-demo
WORK_REPO_ROOT: /workspace
ECOMMERCE_DOC_ROOT: /workspace/_build/default/demos/ecommerce/ui/src
TODO_DOC_ROOT: /workspace/_build/default/demos/todo/ui/src
x-app-base: &app-base
build:
context: .
dockerfile: Dockerfile
user: "0:0"
working_dir: /workspace
volumes:
- .:/src:ro
- opam-root:/home/opam/.opam
- node-modules:/workspace/node_modules
- dune-build:/workspace/_build
environment:
<<: *app-env
services:
linux-check:
<<: *app-base
command: ["/bin/bash", "/src/run-linux-demos.sh", "check"]
postgres:
image: postgres:16
restart: unless-stopped
command: postgres -c max_connections=200
environment:
POSTGRES_USER: executor
POSTGRES_PASSWORD: executor-password
POSTGRES_DB: executor_db
POSTGRES_HOST_AUTH_METHOD: md5
healthcheck:
test: ["CMD-SHELL", "pg_isready -U executor -d executor_db"]
interval: 5s
timeout: 5s
retries: 10
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./docker/postgres-init:/docker-entrypoint-initdb.d:ro
- ./demos/ecommerce/server/sql:/seed-sql:ro
ecommerce-demo:
<<: *app-base
depends_on:
postgres:
condition: service_healthy
environment:
<<: *app-env
DB_URL: postgres://executor:executor-password@postgres:5432/executor_db
API_BASE_URL: http://localhost:8899
SERVER_INTERFACE: "0.0.0.0"
command: ["/bin/bash", "/src/run-linux-demos.sh", "ecommerce"]
ports:
- "8899:8899"
todo-demo:
<<: *app-base
environment:
<<: *app-env
SERVER_INTERFACE: "0.0.0.0"
command: ["/bin/bash", "/src/run-linux-demos.sh", "todo"]
ports:
- "8080:8080"
volumes:
opam-root:
node-modules:
dune-build:
postgres-data: