-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (63 loc) · 1.58 KB
/
docker-compose.yml
File metadata and controls
63 lines (63 loc) · 1.58 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: '3'
services:
frontend:
container_name: frontend
build:
# string containing a path to the build context
context: ./frontend
# volumes:
# - ./frontend:/var/www
web:
container_name: node_api
build:
# string containing a path to the build context
context: ./server
# Expose ports
ports:
- "8000:8000"
volumes:
- ./server:/var/node-api
links:
- mongo
environment:
HTTP_TIMEOUT: 10000
PORT: 8000
NODE_ENV: 'development'
DATABASE: 'mongodb://mongo:27017/main'
JWT_SECRET: 'xisd3b4k5ds6vsfd'
deploy:
# Configures if and how to restart containers when they exit.
restart_policy:
# One of none, on-failure or any (default: any).
condition: always
# command: pm2-runtime start ecosystem.config.js
mongo:
container_name: mongo
image: mongo:latest
volumes:
- ./data/db:/data/db
# Add environment variables
environment:
MONGO_DATA_DIR: /data/db
MONGO_LOG_DIR: /dev/null
deploy:
# Configures if and how to restart containers when they exit.
restart_policy:
# One of none, on-failure or any (default: any).
condition: always
command: mongod --smallfiles --logpath=/dev/null # --quiet
server:
image: abiosoft/caddy
container_name: caddy
restart: always
ports:
- "80:80"
- "443:443"
- "8080:8080"
links:
- web
- frontend
volumes:
- "./Caddyfile:/etc/Caddyfile"
- "./frontend/dist:/srv"
- "./.caddy:/root/.caddy"