-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnextcloud.yml
More file actions
155 lines (146 loc) · 4.15 KB
/
Copy pathnextcloud.yml
File metadata and controls
155 lines (146 loc) · 4.15 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
153
154
155
services:
db:
user: "${USER_ID}:${GROUP_ID}"
image: mariadb:10.6
container_name: nextcloud_stack_db
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
compress: "true"
environment:
MARIADB_DATABASE: ${DB_DATABASE}
MARIADB_USER: ${DB_USER}
MARIADB_PASSWORD: ${DB_PASSWORD}
MARIADB_ROOT_HOST: ${DB_ROOT_HOST}
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MARIADB_AUTO_UPGRADE: ${DB_AUTO_UPGRADE}
MARIADB_DISABLE_UPGRADE_BACKUP: ${DB_DISABLE_UPGRADE_BACKUP}
volumes:
- db_data:/var/lib/mysql:Z
#- ${DB_INIT_FILE}:/docker-entrypoint-initdb.d/init.sql
networks:
- nextcloud_net
redis:
user: "${USER_ID}:${GROUP_ID}"
image: redis:alpine
container_name: nextcloud_stack_redis
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
compress: "true"
volumes:
- redis_data:/data
networks:
- nextcloud_net
nextcloud:
user: "${USER_ID}:${GROUP_ID}"
image: nextcloud:fpm-alpine
container_name: nextcloud_stack_nextcloud
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
compress: "true"
environment:
MYSQL_HOST: db
REDIS_HOST: redis
NEXTCLOUD_ADMIN_USER: ${NEXTCLOUD_ADMIN_USER}
NEXTCLOUD_ADMIN_PASSWORD: ${NEXTCLOUD_ADMIN_PASSWORD}
NEXTCLOUD_DATA_DIR: ${NEXTCLOUD_DATA_DIR}
NEXTCLOUD_TRUSTED_DOMAINS: ${NEXTCLOUD_TRUSTED_DOMAINS}
NEXTCLOUD_OVERWRITECLIURL: ${NEXTCLOUD_OVERWRITECLIURL}
NEXTCLOUD_OVERWRITEPROTOCOL: ${NEXTCLOUD_OVERWRITEPROTOCOL}
PHP_MEMORY_LIMIT: ${PHP_MEMORY_LIMIT}
PHP_UPLOAD_LIMIT: ${PHP_UPLOAD_LIMIT}
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- nextcloud_app_data:/var/www/html:z
- nextcloud_datadir:/datadir:z
# Introduced redis session handler does not work with non-root images
# https://github.com/nextcloud/docker/issues/763
- ${REDIS_VOLUME_PATH}/redis-session.ini:/usr/local/etc/php/conf.d/redis-session.ini
networks:
- nextcloud_net
depends_on:
- db
- redis
nginx:
image: nginx:alpine
container_name: nextcloud_stack_nginx
restart: unless-stopped
ports:
- ${NGINX_HTTP_PORT}:80
volumes:
- ${NGINX_VOLUME_PATH}/nginx.conf:/etc/nginx/nginx.conf
- nextcloud_app_data:/var/www/html:z,ro
networks:
- nextcloud_net
depends_on:
- nextcloud
# (!) cron job issue -> https://github.com/nextcloud/docker/issues/1695
# cron:
# #user: "${USER_ID}:${GROUP_ID}"
# image: nextcloud:fpm-alpine
# container_name: nextcloud_stack_cron
# restart: unless-stopped
# volumes:
# - nextcloud_app_data:/var/www/html:z
# entrypoint: /cron.sh
# networks:
# - nextcloud_net
# depends_on:
# - nextcloud
networks:
nextcloud_net:
name: nextcloud_stack_net
driver: bridge
attachable: true
driver_opts:
com.docker.network.bridge.enable_ip_masquerade: "true"
com.docker.network.bridge.enable_icc: "true"
com.docker.network.driver.mtu: "1500"
ipam:
driver: default
config:
- subnet: ${NETWORK_SUBNET}
gateway: ${NETWORK_GATEWAY}
volumes:
db_data:
name: nextcloud_stack_volume_db
driver: local
driver_opts:
o: bind
type: none
device: ${DB_VOLUME_PATH}
redis_data:
name: nextcloud_stack_volume_redis
driver: local
driver_opts:
o: bind
type: none
device: ${REDIS_VOLUME_PATH}
nextcloud_app_data:
name: nextcloud_stack_volume_nextcloud_app
driver: local
driver_opts:
o: bind
type: none
device: ${NEXTCLOUD_APP_VOLUME_PATH}
nextcloud_datadir:
name: nextcloud_stack_volume_nextcloud_datadir
driver: local
driver_opts:
o: bind
type: none
device: ${NEXTCLOUD_DATADIR_VOLUME_PATH}