-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
64 lines (62 loc) · 1.63 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
57
58
59
60
61
62
63
64
services:
# chown vomlume bind mode
init-chown-volumes:
image: busybox
command: ["sh", "-c", "chown -R ${UID:-0}:${GID:-0} /app/data"]
volumes:
- ./data:/app/data/
user: root
env_file:
- .env
init: true
# service app
mc-data-manger:
container_name: mc-data-manager
depends_on:
- init-chown-volumes
build:
context: .
dockerfile: Dockerfile
args:
UID: ${UID:-0}
GID: ${GID:-0}
USER: ${USER_NAME:-root}
GROUP: ${GROUP_NAME:-root}
WEB_DIR : ${WEB_DIR:-/web}
APP_HOME: /app
tty: true
ports:
- "3300:3300"
restart : always
volumes:
- ./data:/app/data/
- ./scripts:/app/scripts/
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
# Health check configuration
# OK [ 2xx ,3xx}, ERR [4xx,5xx,...etc]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3300/readyZ"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
##################
## OPTIONAL ##
##################
## OPTIONAL LOGGING SETTINGS
# logging:
# driver: "json-file"
# options:
# max-size: "5m" # max-size each log file
# max-file: "10" # max-index, log files
## OPTIONAL RESOURCE LIMITS
# deploy:
# resources:
# limits:
# cpus: "2.0" # Capacity CPU : 2.0 (100% of a Dual CPU core)
# memory: "1024M" # Capacity Mem : 1024MB
# reservations:
# cpus: "0.5" # allocated CPU: 0.25 (25% of a single CPU core)
# memory: "512M" # allocated Mem: 256MB