-
Notifications
You must be signed in to change notification settings - Fork 5
/
compose.yaml
80 lines (75 loc) · 1.87 KB
/
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
services:
mongo:
image: mongo
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_DB_USER:-ROOT}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_DB_PASSWORD:-1234}
networks:
- backend-net
healthcheck:
test: ['CMD', 'mongosh', '--quiet', '--eval', "db.adminCommand('ping')"]
interval: 20m
timeout: 5s
retries: 5
start_period: 45s
volumes:
- mongo-data:/data/db
# Uncomment Only If You Want To access the mongodb instance from your machine
# ports:
# - 27017:27017
mongo-express:
image: mongo-express
restart: unless-stopped
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: ${MONGO_DB_USER}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGO_DB_PASSWORD}
ME_CONFIG_MONGODB_URL: mongodb://${MONGO_DB_USER}:${MONGO_DB_PASSWORD}@mongo:27017/telwareDB?authSource=admin
ME_CONFIG_BASICAUTH: 'false'
networks:
- backend-net
depends_on:
mongo:
condition: service_healthy
backend:
image: telware/backend
build:
context: .
dockerfile: dev.Dockerfile
ports:
- '${PORT:-3000}:3000'
volumes:
- .:/app
- /app/node_modules
environment:
- NODE_ENV=${NODE_ENV:-development}
- PORT=${PORT:-3000}
restart: unless-stopped
depends_on:
mongo:
condition: service_healthy
redis:
condition: service_healthy
networks:
- backend-net
redis:
image: redis/redis-stack
restart: unless-stopped
ports:
- 6379:6379
- 8001:8001
networks:
- backend-net
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 20m
timeout: 5s
retries: 5
start_period: 45s
# TODO: Add some environment variables that might be used in production
networks:
backend-net:
volumes:
mongo-data: