Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
100 lines (91 loc) · 2.76 KB
/
Copy pathdocker-compose.yml
File metadata and controls
100 lines (91 loc) · 2.76 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
95
96
97
98
99
100
x-volumes: &default-volumes
volumes:
- ./dist:/app/dist
- ./public:/app/public
- ./src:/app/src
- ./test:/app/test
- ./tools:/app/tools
x-environment: &x-environment
CI: ${CI}
PLAYWRIGHT_COMMAND_LINE_OPTIONS: ${PLAYWRIGHT_COMMAND_LINE_OPTIONS}
services:
compile:
build: .
image: statuspage-embed-build
entrypoint: ["npm", "run", "build"]
#<<: *default-volumes
# Note that `server.allowedHosts` in vite.config.js needs to include the name
# of this service so that the e2e tests container can access the dev server.
dev:
build:
dockerfile: Dockerfile.development
image: statuspage-embed-dev-server
ports:
- "5173:5173"
networks:
- statuspage-embed-net
# See the note about HMR not picking up changes to source files made in the
# hypervisor in the "Develop" section of README.md.
# <<: *default-volumes
# Note that `server.allowedHosts` in vite.config.js needs to include the name
# of this service so that the container can access the dev server container
# it runs the tests against.
e2e-tests:
build:
dockerfile: Dockerfile.e2e-tests
image: statuspage-embed-e2e-tests
depends_on:
- dev
environment:
<<: *x-environment
PLAYWRIGHT_BASE_URL: http://dev:5173
# https://playwright.dev/docs/ci#docker
# CI configurations > Docker
# "Using --ipc=host is also recommended when using Chromium.
# Without it Chromium can run out of memory and crash."
ipc: host
networks:
- statuspage-embed-net
# <<: *default-volumes
e2e-tests-update-golden-files:
build:
dockerfile: Dockerfile.e2e-tests
image: statuspage-embed-e2e-tests
depends_on:
- dev
environment:
<<: *x-environment
PLAYWRIGHT_BASE_URL: http://dev:5173
# https://playwright.dev/docs/ci#docker
# CI configurations > Docker
# "Using --ipc=host is also recommended when using Chromium. Without it Chromium can run out of memory and crash."
ipc: host
networks:
- statuspage-embed-net
command: [ "npm", "run", "test:update-golden-files" ]
#<<: *default-volumes
statuspage-proxy:
build:
dockerfile: Dockerfile.statuspage-proxy
environment:
- API_KEY=${API_KEY}
- STATUSPAGE_URL=${STATUSPAGE_URL}
image: statuspage-summary-cors-proxy
ports:
- "3000:3000"
#<<: *default-volumes
unit-tests:
build:
dockerfile: Dockerfile.unit-tests
image: statuspage-embed-unit-tests
command: ["npm", "run", "test"]
#<<: *default-volumes
unit-tests-watch:
build:
dockerfile: Dockerfile.unit-tests
image: statuspage-embed-unit-tests
command: ["npm", "run", "test:watch"]
#<<: *default-volumes
networks:
statuspage-embed-net:
driver: bridge