-
Notifications
You must be signed in to change notification settings - Fork 643
Expand file tree
/
Copy pathbuild.docker-compose.worktree.yml
More file actions
94 lines (88 loc) · 3.06 KB
/
Copy pathbuild.docker-compose.worktree.yml
File metadata and controls
94 lines (88 loc) · 3.06 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Worktree-local isolation overlay for build.docker-compose.yml.
#
# build.docker-compose.yml is the file CI's E2E lane uses
# (.github/workflows/e2e-playwright-reusable.yml, the `compose-file` default),
# so it is the only correct base for a local CI-parity run. What it is not is
# safe to run next to anything else: every service pins a container_name, the
# published ports are fixed, the built images take fixed tags, and the default
# network pins subnet 172.20.1.0/24. Any one of those collides with a second
# stack on the same machine, and `down -v` against fixed names destroys the
# other stack's volumes rather than your own.
#
# This overlay removes each of those global claims WITHOUT touching a single
# thing CI actually exercises: same Dockerfiles, same build contexts, same
# service topology, same env, same volumes. Only identity and binding change.
# Layer it second and pass a per-worktree `-p <project>`; scripts/run-e2e-like-ci.sh
# does both.
#
# published: "0" asks the kernel for a free ephemeral port; read the real one
# back with `docker compose port <service> <container-port>`.
services:
certs:
container_name: !reset null
image: ${E2E_STACK_PROJECT:-oe2-e2e}-certgen
db.openelis.org:
container_name: !reset null
image: ${E2E_STACK_PROJECT:-oe2-e2e}-database
ports: !override
- name: postgres
target: 5432
published: "0"
host_ip: 127.0.0.1
protocol: tcp
oe.openelis.org:
container_name: !reset null
image: ${E2E_STACK_PROJECT:-oe2-e2e}-webapp
ports: !override
- name: http
target: 8080
published: "0"
host_ip: 127.0.0.1
protocol: tcp
- name: https
target: 8443
published: "0"
host_ip: 127.0.0.1
protocol: tcp
# The base file pins this service to 172.20.1.121, an address inside the
# subnet removed below. Leaving it would fail container start with
# "no configured subnet contains IP address 172.20.1.121". Nothing reads the
# literal (only build.docker-compose.yml and the installer template mention
# it), and services address each other by Compose service name, so drop it.
networks: !override
default: {}
fhir.openelis.org:
container_name: !reset null
image: ${E2E_STACK_PROJECT:-oe2-e2e}-fhir
ports: !override
- name: http
target: 8080
published: "0"
host_ip: 127.0.0.1
protocol: tcp
- name: https
target: 8443
published: "0"
host_ip: 127.0.0.1
protocol: tcp
frontend.openelis.org:
container_name: !reset null
image: ${E2E_STACK_PROJECT:-oe2-e2e}-frontend
proxy:
container_name: !reset null
image: ${E2E_STACK_PROJECT:-oe2-e2e}-proxy
ports: !override
- name: http
target: 80
published: "0"
host_ip: 127.0.0.1
protocol: tcp
- name: https
target: 443
published: "0"
host_ip: 127.0.0.1
protocol: tcp
networks:
# The base file pins 172.20.1.0/24, which only one stack on the host can hold.
default:
ipam: !reset null