-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose.yml
55 lines (52 loc) · 1.4 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
version: "3.8"
services:
materials-designer:
image: materials-designer:${IMAGE_TAG}
build:
context: .
dockerfile: ./dockerfiles/app/Dockerfile
ports:
- ${PORT}:${PORT}
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:${PORT}" ]
interval: 5s
timeout: 2s
retries: 20
volumes:
- ./src/:/opt/app/src/
- ./entrypoint.sh:/opt/app/entrypoint.sh
profiles:
- ""
- use-vnc
# Meant to be used for CI/CD testing
materials-designer-test:
image: materials-designer-test:${IMAGE_TAG}
build:
args:
BASE_TAG: ${IMAGE_TAG}
context: .
dockerfile: dockerfiles/tests/Dockerfile
depends_on:
- materials-designer
network_mode: host
volumes:
- ./tests/cypress:/opt/test/cypress
- ./entrypoint.sh:/opt/test/entrypoint.sh
profiles:
- ""
environment:
- CYPRESS_BASE_URL=${CYPRESS_BASE_URL:-http://localhost:${PORT}}
- NPM_RUN_COMMAND=${NPM_RUN_COMMAND:-test:headless}
# For local testing with access via VNC
materials-designer-test-vnc:
image: materials-designer-test-vnc:${IMAGE_TAG}
build:
context: .
dockerfile: dockerfiles/tests/Dockerfile-vnc
ports:
- ${VNC_PORT}:${VNC_PORT}
volumes:
- ./tests/cypress:/opt/test/cypress
- ./entrypoint-vnc.sh:/opt/test/entrypoint-vnc.sh
profiles:
- use-vnc