-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
49 lines (47 loc) · 1.2 KB
/
docker-compose.test.yml
File metadata and controls
49 lines (47 loc) · 1.2 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
services:
mongo:
image: mongo:7
ports:
- "27017:27017"
tmpfs:
- /data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 5s
timeout: 5s
retries: 10
node-api:
build:
context: ${NODE_CONTEXT:-../Node}
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
NODE_ENV: test
DEVKIT_NODE_api_port: "3001"
DEVKIT_NODE_db_uri: mongodb://mongo:27017/NodeTest
DEVKIT_NODE_cors_origin: '["http://localhost:${VUE_PORT:-8080}","http://vue:8080"]'
DEVKIT_NODE_cors_credentials: "true"
depends_on:
mongo:
condition: service_healthy
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://localhost:3000/api/home').then(r => { if (!r.ok) throw 1 })"]
interval: 5s
timeout: 5s
retries: 10
vue:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "${VUE_PORT:-8080}:8080"
environment:
NODE_ENV: test
DEVKIT_VUE_api_protocol: http
DEVKIT_VUE_api_host: localhost
DEVKIT_VUE_api_port: "3000"
DEVKIT_VUE_api_base: api
depends_on:
node-api:
condition: service_healthy