forked from dopos/dcape-app-nextcloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
107 lines (100 loc) · 3.2 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
services:
app:
image: ${NGINX_IMAGE}:${NGINX_IMAGE_VER}
depends_on:
- nextcloud
restart: always
labels:
# hsts middleware defined in DCAPE/apps/traefik/docker-compose.inc.yml
- traefik.http.routers.${APP_TAG}.middlewares=hsts
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ${APP_ROOT}/html:/var/www/html:ro
- ${APP_ROOT}/data:${DATA_DIR}:ro
- ${APP_ROOT}/etc/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
nextcloud:
image: ${IMAGE}:${IMAGE_VER}
hostname: ${APP_TAG}-nextcloud
restart: always
depends_on:
- cache
labels:
- traefik.enable=false
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ${APP_ROOT}/html:/var/www/html
- ${APP_ROOT}/data:${DATA_DIR}
- ${APP_ROOT}/config:/var/www/html/config
- ${APP_ROOT}/etc/php-fpm.d/zz-docker.conf:/usr/local/etc/php-fpm.d/zz-docker.conf:ro
- ${APP_ROOT}/etc/php/opcache-recommended.ini:/usr/local/etc/php/conf.d/opcache-recommended.ini:ro
environment:
- POSTGRES_DB=${PGDATABASE}
- POSTGRES_USER=${PGUSER}
- POSTGRES_PASSWORD=${PGPASSWORD}
- POSTGRES_HOST=db
- NEXTCLOUD_ADMIN_USER=${USER_NAME}
- NEXTCLOUD_ADMIN_PASSWORD=${USER_PASS}
- NEXTCLOUD_TRUSTED_DOMAINS=${APP_SITE}
- NEXTCLOUD_DATA_DIR=${DATA_DIR}
- OVERWRITEPROTOCOL=https
- TRUSTED_PROXIES=${DCAPE_SUBNET}
- REDIS_HOST=${APP_TAG}-cache
- REDIS_HOST_PASSWORD=${REDIS_PASS}
cache:
image: ${REDIS_IMAGE}:${REDIS_IMAGE_VER}
hostname: ${APP_TAG}-cache
restart: always
command: redis-server --requirepass ${REDIS_PASS}
sysctls:
net.core.somaxconn: 511
labels:
- traefik.enable=false
volumes:
- ${APP_ROOT}/redis:/var/lib/redis
rabbitmq:
image: rabbitmq
restart: always
expose:
- "5672"
labels:
- traefik.enable=false
volumes:
- ${APP_ROOT}/rabbitmq:/var/lib/rabbitmq
onlyoffice:
image: ${OO_IMAGE}:${OO_IMAGE_VER}
restart: always
depends_on:
- rabbitmq
stdin_open: true
stop_grace_period: 60s
environment:
- DB_TYPE=postgres
- DB_NAME=${OO_PGDATABASE}
- DB_USER=${OO_PGUSER}
- DB_PWD=${OO_PGPASSWORD}
- DB_HOST=db
- DB_PORT=5432
- AMQP_TYPE=rabbitmq
- AMQP_URI=amqp://guest:guest@rabbitmq
- REDIS_SERVER_HOST=${APP_TAG}-cache
- JWT_ENABLED=true
- JWT_SECRET=${OO_JWT_SECRET}
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ${APP_ROOT}/oo-data:/var/www/onlyoffice/Data
- ${APP_ROOT}/oo-logs:/var/log/onlyoffice
labels:
traefik.enable: true
dcape.traefik.tag: ${DCAPE_TAG}
traefik.http.routers.${APP_TAG}-oo.rule: Host(`${OO_APP_SITE}`)
traefik.http.routers.${APP_TAG}-oo.middlewares: hsts, oo-headers
traefik.http.routers.${APP_TAG}-oo.tls: ${USE_TLS}
traefik.http.middlewares.oo-headers.headers.customrequestheaders.X-Forwarded-Proto: https
traefik.http.middlewares.oo-headers.headers.accessControlAllowOriginList: '*'
networks:
default:
external: true
name: ${DCAPE_NET}