-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
60 lines (56 loc) · 1.49 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
version: '2'
services:
proxy:
image: abiosoft/caddy:no-stats
restart: always
ports:
- 80:80
- 443:443
environment:
- CADDYPATH=/certs
- ACME_AGREE=true
# CHANGE THESE OR THE CONTAINER WILL FAIL TO RUN
- CADDY_LETSENCRYPT_EMAIL=certificates@example.com
- CADDY_EXTERNAL_DOMAIN=mydomain.com
- CADDY_PROXY_URL=http://app:80
volumes:
- ./data/letsencrypt:/certs:rw
- ./config/Caddyfile:/etc/Caddyfile:ro
app:
image: nextcloud:latest
restart: always
## Enable this to access the nextcloud instance locally,
## without the reverse proxy. (debugging only!!!)
ports:
- 8080:80
environment:
- REDIS_HOST=cache
# database connection
- MYSQL_HOST=database
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=nextcloud
volumes:
- ./data/nextcloud_config:/var/www/html/config:rw
- ./data/nextcloud_apps:/var/www/html/custom_apps:rw
- ./data/nextcloud_data:/var/www/html/data:rw
database:
image: mariadb:latest
restart: always
command:
- --transaction-isolation=READ-COMMITTED
- --binlog-format=ROW
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
volumes:
- ./data/database:/var/lib/mysql
environment:
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=nextcloud
- MYSQL_RANDOM_ROOT_PASSWORD=1
cache:
image: redis:alpine
restart: always
volumes:
- ./data/cache:/data:rw