-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
163 lines (163 loc) · 6.16 KB
/
docker-compose.yml
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
153
154
155
156
157
158
159
160
161
162
163
services:
gluetun:
image: qmcgaw/gluetun
container_name: gluetun
cap_add:
- NET_ADMIN
ports:
- "8989:8989"
- "3789:3789"
env_file:
- "web/config/.env"
restart: always
web:
build: ./docker/images/nginx
container_name: privuma_nginx
volumes:
- "./docker/etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"
- "./docker/etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template:ro"
- "../../services/tailscale/certs/certificate.crt:/var/ssl.cert:ro"
- "../../services/tailscale/certs/certificate.key:/var/ssl.key:ro"
- ./docker/etc/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- "./web/:/var/www/html/:ro"
environment:
- NGINX_HOST=${NGINX_HOST}
command: /bin/sh -c "envsubst '$$NGINX_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
restart: always
depends_on:
- php-web
- gluetun
network_mode: "service:gluetun"
deploy:
resources:
limits:
cpus: "0.2"
memory: 250M
php-web:
build:
context: ./docker/images/php
args:
USERID: 1003
PHP_PORT: 9701
target: prod
# image: cenode/privuma-php
restart: always
container_name: privuma_php_web
env_file:
- "web/config/.env"
command: bash -c "echo "" > /etc/cron.d/privuma && php-fpm"
volumes:
- ./docker/etc/php/php.ini:/usr/local/etc/php/conf.d/z-php.ini:ro
- ./docker/etc/php/zz-overrides.ini:/usr/local/etc/php/conf.d/zz-overrides.ini:ro
- ./docker/etc/php/zzz-overrides.conf:/usr/local/etc/php-fpm.d/zzz-overrides.conf:ro
- "./web/:/var/www/html/"
depends_on:
# - db
- gluetun
network_mode: "service:gluetun"
deploy:
resources:
limits:
cpus: "0.4"
memory: 1G
php-cron:
build:
context: ./docker/images/php
args:
USERID: 1003
PHP_PORT: 9702
target: prod
# image: cenode/privuma-php
security_opt:
- seccomp:seccomp.json
restart: always
container_name: privuma_php_cron
env_file:
- "web/config/.env"
volumes:
- ./docker/etc/php/zz-overrides.ini:/usr/local/etc/php/conf.d/zz-overrides.ini:ro
- ./docker/etc/php/zzz-overrides.conf:/etc/php-fpm.d/zzz-overrides.conf:ro
- "./web/:/var/www/html/"
- "./cron.log:/var/log/cron.log"
depends_on:
# - db
- gluetun
network_mode: "service:gluetun"
deploy:
resources:
limits:
cpus: "2.0"
memory: 2G
db:
image: mariadb
restart: always
container_name: privuma_db
env_file:
- "web/config/.env"
ports:
- 3306:3306
# network_mode: "service:gluetun"
# depends_on:
# - gluetun
volumes:
- ./docker/db:/var/lib/mysql
- ./docker/etc/mariadb/custom.cnf:/etc/mysql/conf.d/custom.cnf
- ./docker/images/mariadb/init.sql:/docker-entrypoint-initdb.d/init.sql
deploy:
resources:
limits:
cpus: "0.8"
memory: 1G
cloudfs-http:
image: rclone/rclone:latest
container_name: privuma_cloudfs_http
restart: always
volumes:
- ./web/config/rclone:/config/rclone
user: "${UID}:${GID}"
depends_on:
- gluetun
network_mode: "service:gluetun"
command: serve http --read-only --no-checksum --no-modtime --addr :8991 ${CLOUDFS_HTTP_REMOTE} --include *.{jpg,jpeg,png,gif,mp4,mov,webm,pdf,html,txt,js,css,svg,js\-gz,txt\-gz} --dir-cache-time 1m --vfs-cache-mode full --vfs-cache-max-age 30m --vfs-cache-max-size 8G --vfs-read-chunk-size 64M --vfs-read-chunk-size-limit off --buffer-size 64M
cloudfs-http-secondary:
image: rclone/rclone:latest
container_name: privuma_cloudfs_http_secondary
restart: always
volumes:
- ./web/config/rclone:/config/rclone
user: "${UID}:${GID}"
depends_on:
- gluetun
network_mode: "service:gluetun"
command: serve http --read-only --no-checksum --no-modtime --addr :8992 ${CLOUDFS_HTTP_SECONDARY_REMOTE} --include *.{jpg,jpeg,png,gif,mp4,mov,webm,pdf,html,txt,js,css,svg,js\-gz,txt\-gz} --dir-cache-time 1m --vfs-cache-mode full --vfs-cache-max-age 30m --vfs-cache-max-size 8G --vfs-read-chunk-size 64M --vfs-read-chunk-size-limit off --buffer-size 64M
cloudfs-http-tertiary:
image: rclone/rclone:latest
container_name: privuma_cloudfs_http_teriary
restart: always
volumes:
- ./web/config/rclone:/config/rclone
user: "${UID}:${GID}"
depends_on:
- gluetun
network_mode: "service:gluetun"
command: serve http --read-only --no-checksum --no-modtime --addr :8993 ${CLOUDFS_HTTP_TERTIARY_REMOTE} --include *.{jpg,jpeg,png,gif,mp4,mov,webm,pdf,html,txt,js,css,svg,js\-gz,txt\-gz} --dir-cache-time 1m --vfs-cache-mode full --vfs-cache-max-age 30m --vfs-cache-max-size 8G --vfs-read-chunk-size 64M --vfs-read-chunk-size-limit off --buffer-size 64M
cloudfs-http-quadary:
image: rclone/rclone:latest
container_name: privuma_cloudfs_http_quadary
restart: always
ports:
- 8994:8994
volumes:
- ./web/config/rclone:/config/rclone
user: "${UID}:${GID}"
command: serve http --read-only --no-checksum --no-modtime --addr :8994 --user ${CLOUDFS_HTTP_QUADARY_USER} --pass ${CLOUDFS_HTTP_QUADARY_PASS} ${CLOUDFS_HTTP_QUADARY_REMOTE} --include *.{jpg,jpeg,png,gif,mp4,mov,webm,pdf,html,txt,js,css,svg,js\-gz,txt\-gz} --dir-cache-time 1m --vfs-cache-mode full --vfs-cache-max-age 30m --vfs-cache-max-size 8G --vfs-read-chunk-size 64M --vfs-read-chunk-size-limit off --buffer-size 64M
# cloudfs-s3:
# image: rclone/rclone:beta
# container_name: privuma_cloudfs_s3
# restart: always
# volumes:
# - ./web/config/rclone:/config/rclone
# user: "${UID}:${GID}"
# ports:
# - "8994:80"
# command: serve s3 --auth-key ${CLOUDFS_S3_ACCESS_KEY},${CLOUDFS_S3_SECRET_KEY} --read-only --no-checksum --no-modtime --addr :80 ${CLOUDFS_S3_REMOTE} --include *.{jpg,jpeg,png,gif,mp4,mov,webm,pdf,html,txt,js,css,svg,js\-gz,txt\-gz} --dir-cache-time 1m --vfs-cache-mode full --vfs-cache-max-age 30m --vfs-cache-max-size 8G --vfs-read-chunk-size 64M --vfs-read-chunk-size-limit off --buffer-size 64M