-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
139 lines (129 loc) · 4.57 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
version: '2'
volumes:
mariadb:
web-certs:
networks:
nextcloud:
services:
mysql:
image: mariadb
restart: always
# https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/mysql_4byte_support.html
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --innodb-large-prefix --innodb-file-per-table --innodb-file-format=barracuda --skip-innodb-read-only-compressed
volumes:
- mariadb:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
networks:
- nextcloud
# DB proxy: watch docker logs to see all sql queries
# `docker-compose logs -f db`
db:
build: ./docker-mysql-proxy
restart: always
volumes:
- ./docker-mysql-proxy/log.lua:/opt/mysql-proxy/conf/log.lua:ro
- ./docker-mysql-proxy/main.lua:/opt/mysql-proxy/conf/main.lua:ro
environment:
PROXY_DB_PORT: 3306
REMOTE_DB_HOST: mysql
REMOTE_DB_PORT: 3306
LUA_SCRIPT: "/opt/mysql-proxy/conf/main.lua"
LOG_FILE: "/tmp/mysql.log"
depends_on:
- mysql
networks:
- nextcloud
php:
image: skjnldsv/nextcloud-dev
volumes:
- ./server:/var/www/nextcloud
- ./data:/var/www/nextcloud/data
- ./apps2:/var/www/nextcloud/apps2
# COMMENT IF YOU WANT FULL CONTROL ON THE NEXTCLOUD INITIAL SETUP
- ./config/autoconfig.php:/var/www/nextcloud/config/autoconfig.php:ro
- ./config/debug.config.php:/var/www/nextcloud/config/debug.config.php:ro
# COMMENT TO DISABLE REDIS
- ./config/redis.config.php:/var/www/nextcloud/config/redis.config.php:ro
# UNCOMMENT TO ENABLE SMTP
# - ./config/smtp.config.php:/var/www/nextcloud/config/smtp.config.php:ro
- ./config/apps.config.php:/var/www/nextcloud/config/apps.config.php:ro
restart: always
environment:
# use mysql instead of db if you disabled the db proxy
- MYSQL_HOST=db
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
# comment if redis is disabled
- REDIS_HOST=redis
- PHP_IDE_CONFIG='serverName=cli'
- NEXTCLOUD_DATA_DIR=/var/www/nextcloud/data
# UNCOMMENT TO ENABLE XDEBUG
# host.docker.internal is initiated on the container on each start
# and bound to the host ip
- XDEBUG_CONFIG=remote_host=host.docker.internal remote_autostart=On remote_enable=On idekey=XDEBUG remote_log=/tmp/xdebug.log remote_port=9999
- PHP_XDEBUG_ENABLED=1
- PHP_XDEBUG_IDE_KEY=XDEBUG
depends_on:
# use mysql instead of db if you disabled the db proxy
- db
# comment if redis is disabled
- redis
networks:
- nextcloud
web:
image: nginx
ports:
- 443:443
- 80:80
volumes:
- ./server:/var/www/nextcloud
- ./apps2:/var/www/nextcloud/apps2
- ./nextcloud.conf:/etc/nginx/conf.d/default.conf:ro
- web-certs:/etc/nginx/certs:ro
restart: always
networks:
- nextcloud
depends_on:
- php
omgwtfssl:
image: paulczar/omgwtfssl
volumes:
- web-certs:/certs
environment:
# CHANGE IT TO YOU DOMAIN NAME
- SSL_SUBJECT=dev.domain.com
networks:
- nextcloud
# UNCOMMENT TO ENABLE PHPMYADMIN
# phpmyadmin:
# image: phpmyadmin/phpmyadmin:latest
# environment:
# - MYSQL_ROOT_PASSWORD=rootpassword
# - MYSQL_PASSWORD=password
# - MYSQL_DATABASE=nextcloud
# - MYSQL_USER=nextcloud
# # use mysql instead of db if you disabled the db proxy
# - PMA_HOST=db
# restart: always
# networks:
# - nextcloud
# depends_on:
# # use mysql instead of db if you disabled the db proxy
# - db
# UNCOMMENT TO ENABLE SMTP
# smtp:
# image: namshi/smtp
# restart: always
# networks:
# - nextcloud
# COMMENT TO DISABLE REDIS
redis:
image: redis:latest
restart: always
networks:
- nextcloud