-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yaml
56 lines (51 loc) · 1.3 KB
/
docker-compose.yaml
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
version: "3"
services:
mongo:
image: mongo:7
command: ["--replSet", "rs0", "--bind_ip_all", "--port", "27017"]
expose:
- "27017:27017"
healthcheck:
test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'mongo:27017'}]}) }" | mongosh --port 27017 --quiet
interval: 5s
timeout: 30s
start_period: 0s
start_interval: 1s
retries: 30
environment:
# MONGO_INITDB_ROOT_USERNAME: username
# MONGO_INITDB_ROOT_PASSWORD: password
MONGO_INITDB_DATABASE: ementas
volumes:
- ./data:/data/db
prod:
build:
context: .
target: prod
ports:
- "3000:3000"
depends_on:
- mongo
env_file: .env
dev:
build:
context: .
target: dev
volumes:
- .:/app
ports:
- "5173:5173"
depends_on:
- mongo
test:
build:
context: .
target: dev
volumes:
- .:/app
command: npm run test
tesstrain:
build:
context: .
target: tesstrain
command: tail -f /dev/null