-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
79 lines (79 loc) · 2.11 KB
/
Copy pathdocker-compose.yml
File metadata and controls
79 lines (79 loc) · 2.11 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
services:
starry-cloud:
container_name: starry-cloud
build: .
restart: unless-stopped
init: true
ports:
- "5000:5000"
user: "1000:1000"
pids_limit: 128
mem_limit: 128m
memswap_limit: 128m
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
read_only: true
tmpfs:
- /tmp:rw,noexec,nosuid,nodev,size=64m
healthcheck:
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:5000/login', timeout=2)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
environment:
- GUNICORN_THREADS=2
volumes:
# App settings file (create from config.example.yml):
- type: bind
source: ./config.yml
target: /app/config.yml
read_only: true
# Auth secrets file — generate with:
# docker compose run --rm starry-cloud python3 gen_auth.py
- type: bind
source: ./auth.yml
target: /app/auth.yml
read_only: true
# procfs: mount only files required for showing system stats
- type: bind
source: /proc/uptime
target: /host/proc/uptime
read_only: true
- type: bind
source: /proc/meminfo
target: /host/proc/meminfo
read_only: true
- type: bind
source: /proc/stat
target: /host/proc/stat
read_only: true
- type: bind
source: /proc/cpuinfo
target: /host/proc/cpuinfo
read_only: true
- type: bind
source: /proc/sys/kernel/hostname
target: /host/proc/sys/kernel/hostname
read_only: true
# sysfs: mount only files required for showing system stats
- type: bind
source: /sys/class
target: /host/sys/class
read_only: true
- type: bind
source: /sys/devices
target: /host/sys/devices
read_only: true
# hostname only
- type: bind
source: /etc/hostname
target: /host/etc/hostname
read_only: true