-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
154 lines (148 loc) · 4.45 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
version: "3.8"
x-build-cdn-server: &x-build-cdn-server
image: primo-customization-cdn-server
build:
context: ./
cache_from:
- primo-customization-cdn-server
dockerfile: Dockerfile.cdn-server
x-build-e2e: &x-build-e2e
image: primo-customization-e2e
build:
context: ./
dockerfile: test/e2e/Dockerfile
cache_from:
- primo-customization-e2e
x-build-unit: &x-build-unit-tests
image: primo-customization-unit-tests
build:
context: ./
dockerfile: test/unit/Dockerfile
cache_from:
- primo-customization-unit-tests
x-environment: &x-environment
CI: ${CI}
PLAYWRIGHT_COMMAND_LINE_OPTIONS: ${PLAYWRIGHT_COMMAND_LINE_OPTIONS}
VIEW: ${VIEW}
x-build-primo-customization: &x-build-primo-customization
image: primo-customization-devenv
build:
context: ./
cache_from:
- primo-customization-devenv
dockerfile: Dockerfile
services:
app-css:
<<: [ *x-build-primo-customization ]
command: yarn primo-explore-devenv:app-css $VIEW
environment:
<<: *x-environment
# volumes:
# - ./custom:/app/custom
bookmarklet:
<<: [ *x-build-primo-customization ]
command: yarn bookmarklet
networks:
- primo-customization-net
volumes:
- ./tmp:/app/tmp
# NOTE: This service name is hard-coded into the view packages' `getCdn()` code.
# If changing this name, make sure to update that reference.
cdn-server:
<<: [*x-build-cdn-server]
networks:
- primo-customization-net
ports:
- "3000:3000"
# volumes:
# - ./cdn:/app/cdn
create-package:
<<: [*x-build-primo-customization]
command: yarn primo-explore-devenv:create-package $VIEW
environment:
<<: *x-environment
# volumes:
# - ./custom:/app/custom
# - ./primo-explore-devenv/packages/:/app/primo-explore-devenv/packages
curl:
image: appropriate/curl
networks:
- primo-customization-net
e2e:
<<: *x-build-e2e
depends_on:
- primo-explore-devenv
environment:
<<: *x-environment
PLAYWRIGHT_BASE_URL: http://primo-explore-devenv:8003/discovery/search
# 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:
- primo-customization-net
e2e-update-golden-files:
<<: *x-build-e2e
depends_on:
- primo-explore-devenv
environment:
<<: *x-environment
PLAYWRIGHT_BASE_URL: http://primo-explore-devenv:8003/discovery/search
UPDATE_GOLDEN_FILES: true
# 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:
- primo-customization-net
# volumes:
# - ./test/e2e/tests/golden:/e2e/tests/golden
# TODO: What's the best way to get the file out of the container?
eslint-cjs-file:
<<: [ *x-build-primo-customization ]
command: yarn eslint:cjs-file
# TODO: What's the best way to get the files at the root of project out of the container?
eslint-fix:
<<: [ *x-build-primo-customization ]
command: yarn eslint:fix
volumes:
- ./cdn:/app/cdn
- ./custom:/app/custom
- ./scripts:/app/scripts
- ./tools:/app/tools
generate-autogenerated-directives:
<<: [ *x-build-primo-customization ]
command: yarn generate-autogenerated-directives
volumes:
- ./custom:/app/custom
# NOTE: This service name is hard-coded into the view packages' `getCdn()` code.
# If changing this name, make sure to update that reference.
primo-explore-devenv:
<<: [*x-build-primo-customization]
networks:
- primo-customization-net
depends_on:
- cdn-server
environment:
<<: *x-environment
ports:
- "8003:8003"
# volumes:
# - ./custom:/app/custom
unit-tests:
<<: *x-build-unit-tests
update-autogenerated-directives-from-real:
<<: [ *x-build-primo-customization ]
command: yarn update-autogenerated-directives:real
volumes:
- ./custom:/app/custom
- ./scripts:/app/scripts
update-autogenerated-directives-from-sandbox:
<<: [ *x-build-primo-customization ]
command: yarn update-autogenerated-directives:sandbox
volumes:
- ./custom:/app/custom
- ./scripts:/app/scripts
networks:
primo-customization-net:
driver: bridge