-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
41 lines (40 loc) · 927 Bytes
/
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
version: '3'
services:
app:
build: .
env_file:
- .env
depends_on:
- mongo
environment:
- MONGO_URI=mongodb://${NONGO_PRICECOMPARE_USERNAME}:${NONGO_PRICECOMPARE_PASSWORD}@mongo:27017/price-compare # Connect to MongoDB container ${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@
ports:
- "3000:3000"
- "5900:5900"
- "6080:6080"
mongo:
image: mongo:latest
env_file:
- .env
volumes:
- mongo-data:/data/db
ports:
- "27017:27017"
frontend:
build:
context: ./src/web/my-app
ports:
- "3001:3001"
environment:
- PORT=3001
restart: always # Add this line
healthcheck: # Add this health check
test: ["CMD", "curl", "-f", "http://localhost:3001"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
depends_on:
- app
volumes:
mongo-data: