-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
48 lines (44 loc) · 979 Bytes
/
docker-compose.yaml
File metadata and controls
48 lines (44 loc) · 979 Bytes
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
version: '3.7'
services:
mongodb:
image: mongo:3.4
container_name: pickly_db
restart: unless-stopped
volumes:
- mongodb_data:/data/db
healthcheck:
test: ["CMD", "mongo", "--quiet", "--eval", "db.runCommand({ ping: 1 }).ok"]
interval: 10s
timeout: 5s
retries: 8
node_app:
build:
context: .
dockerfile: Dockerfile
image: pickly
container_name: pickly
restart: unless-stopped
depends_on:
mongodb:
condition: service_healthy
environment:
MONGODB_URI: mongodb://mongodb:27017/pickly
NODE_ENV: production
PORT: 3000
ports:
- "127.0.0.1:3000:3000"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/"]
interval: 15s
timeout: 5s
retries: 5
start_period: 20s
security_opt:
- no-new-privileges:true
read_only: true
tmpfs:
- /tmp
cap_drop:
- ALL
volumes:
mongodb_data: