forked from DeebotUniverse/bumper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
152 lines (146 loc) · 4.11 KB
/
docker-compose.yaml
File metadata and controls
152 lines (146 loc) · 4.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
---
x-basic-deploy: &basic-deploy
mode: replicated
replicas: 1
placement:
max_replicas_per_node: 1
constraints:
- "node.role==${NODE_ROLE:-manager}"
- node.platform.os == linux
update_config:
order: stop-first
restart_policy:
condition: any
resources:
limits:
cpus: ${RESOURCES_LIMITS_CPUS:-1}
memory: ${RESOURCES_LIMITS_MEMORY:-500m}
reservations:
cpus: ${RESOURCES_RESERVATIONS_CPUS:-0.001}
memory: ${RESOURCES_RESERVATIONS_MEMORY:-32m}
x-basic: &basic
env_file: .env
cap_add:
- DAC_READ_SEARCH
- SETGID
- SETUID
cap_drop: ["ALL"]
security_opt:
- no-new-privileges:true
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 655360
hard: 655360
fsize: -1
as: -1
networks:
default: {}
healthcheck:
disable: true
restart: always
################################################################################
################################################################################
################################################################################
services:
##############################################################################
##############################################################################
##############################################################################
bumper:
build:
context: .
dockerfile: ./Dockerfile
args:
# https://hub.docker.com/_/python/tags
PY_VERSION: 3.13.5-alpine3.21
# https://github.com/astral-sh/uv/pkgs/container/uv
UV_VERSION: python3.13-alpine
image: ghcr.io/mvladislav/bumper:${VERSION_BUMPER:-latest}
<<: *basic
deploy:
<<: *basic-deploy
ports:
# HTTP Server (non TLS)
- target: 8007
published: 8007
protocol: tcp
mode: host
# MQTT Server (non TLS)
- target: 1883
published: 1883
protocol: tcp
mode: host
# MQTT Server (TLS)
- target: 8883
published: 8883
protocol: tcp
mode: host
# XMPP Server
- target: 5223
published: 5223
protocol: tcp
mode: host
configs:
- source: ca_config
target: /bumper/certs/ca.crt
mode: "0444"
- source: server_crt_config
target: /bumper/certs/bumper.crt
mode: "0444"
- source: server_key_config
target: /bumper/certs/bumper.key
mode: "0444"
environment:
TZ: ${TZ:-Europe/Berlin}
BUMPER_ANNOUNCE_IP: ${BUMPER_ANNOUNCE_IP?Server Announce IP not set}
BUMPER_LISTEN: ${BUMPER_LISTEN:-0.0.0.0}
BUMPER_DEBUG_LEVEL: ${BUMPER_DEBUG_LEVEL:-INFO}
BUMPER_DEBUG_VERBOSE: ${BUMPER_DEBUG_VERBOSE:-1}
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- config:/bumper/data
##############################################################################
##############################################################################
##############################################################################
nginx:
# https://hub.docker.com/_/nginx
image: nginx:${VERSION_NGNIX:-1.29-alpine3.22-slim}
<<: *basic
deploy:
<<: *basic-deploy
ports:
# HTTP Server (TLS)
- target: 443
published: 443
protocol: tcp
mode: host
configs:
- source: nginx_config
target: /etc/nginx/nginx.conf
mode: "0444"
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
################################################################################
################################################################################
################################################################################
networks:
default:
driver: ${NETWORK_MODE:-bridge}
attachable: true
driver_opts:
encrypted: "true"
volumes:
config: {}
configs:
ca_config:
file: $PWD/certs/ca.crt
server_crt_config:
file: $PWD/certs/bumper.crt
server_key_config:
file: $PWD/certs/bumper.key
nginx_config:
file: $PWD/configs/nginx.conf