forked from mkuf/prind
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
121 lines (113 loc) · 2.78 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
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
## Common Templates
x-klipper-svc:
&klipper-svc
image: klipper:latest
build:
context: docker/klipper
target: run
restart: unless-stopped
logging:
driver: none
depends_on:
init:
condition: service_completed_successfully
entrypoint: /opt/venv/bin/python klipper/klippy/klippy.py
command: -I run/klipper.tty -a run/klipper.sock cfg/printer.cfg -l log/klippy.log
## Service Definitions
services:
## Klippy Services
##
klipper:
<<: *klipper-svc
volumes:
- ./config:/opt/cfg
- run:/opt/run
- gcode:/opt/gcode
- log:/opt/log
klipper-priv:
<<: *klipper-svc
privileged: true
volumes:
- /dev:/dev
- ./config:/opt/cfg
- run:/opt/run
- gcode:/opt/gcode
- log:/opt/log
## WebApi
##
moonraker:
image: moonraker:latest
build:
context: docker/moonraker
target: run
restart: unless-stopped
pid: host
logging:
driver: none
command: -c cfg/moonraker.cfg -l log/moonraker.log
depends_on:
init:
condition: service_completed_successfully
klipper:
condition: service_started
volumes:
- /dev/null:/opt/klipper/config/null
- /dev/null:/opt/klipper/docs/null
- /run/dbus:/run/dbus
- /run/systemd:/run/systemd
- run:/opt/run
- gcode:/opt/gcode
- log:/opt/log
- moonraker-db:/opt/db
- ./config:/opt/cfg
labels:
- "traefik.enable=true"
- "traefik.http.services.moonraker.loadbalancer.server.port=7125"
- "traefik.http.routers.moonraker.rule=PathPrefix(`/websocket`,`/printer`,`/api`,`/access`,`/machine`,`/server`)"
- "traefik.http.routers.moonraker.entrypoints=web"
## Frontends
##
fluidd:
image: fluidd:latest
build:
context: docker/fluidd
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.services.fluidd.loadbalancer.server.port=80"
- "traefik.http.routers.fluidd.rule=PathPrefix(`/`)"
- "traefik.http.routers.fluidd.entrypoints=web"
## Accompanying Services/Infra
##
## Config dir needs to be writable by uid/gid 1000
## This container sets the right permissions and exits
init:
image: busybox:latest
command: chown -R 1000:1000 /prind/config
volumes:
- .:/prind
## Loadbalancer/Proxy
traefik:
image: traefik:v2.5
command:
- "--accesslog"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
restart: unless-stopped
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
volumes:
run:
driver_opts:
type: tmpfs
device: tmpfs
gcode:
octoprint:
moonraker-db:
log:
driver_opts:
type: tmpfs
device: tmpfs