2022-06-01 11:10:06 +00:00
|
|
|
version: '3.8'
|
|
|
|
|
|
|
|
services:
|
2022-10-31 21:39:29 +00:00
|
|
|
|
|
|
|
nextcloud:
|
|
|
|
image: nextcloud
|
|
|
|
container_name: nextcloud
|
|
|
|
links:
|
|
|
|
- db
|
|
|
|
volumes:
|
|
|
|
- ./nextcloud:/var/www/html
|
|
|
|
networks:
|
|
|
|
- services
|
|
|
|
- nextcloud
|
|
|
|
depends_on:
|
|
|
|
- traefik
|
|
|
|
- db
|
|
|
|
environment:
|
2022-11-02 18:52:48 +00:00
|
|
|
- MYSQL_USER=nextcloud
|
2022-10-31 21:39:29 +00:00
|
|
|
- MYSQL_PASSWORD=
|
|
|
|
- MYSQL_DATABASE=nextcloud
|
|
|
|
- MYSQL_HOST=db
|
2022-11-03 16:26:54 +00:00
|
|
|
labels:
|
|
|
|
## Expose Nextcloud Through Trefik ##
|
|
|
|
- "traefik.enable=true" # <== Enable traefik to proxy this container
|
|
|
|
- "traefik.http.routers.nextcloud.rule=Host(`nextcloud.luke-else.co.uk`) || Host(`www.nextcloud.luke-else.co.uk`)"
|
|
|
|
- "traefik.http.routers.nextcloud.entrypoints=http"
|
|
|
|
- "traefik.http.routers.nextcloud.middlewares=redirect@file"
|
|
|
|
|
|
|
|
- "traefik.http.routers.nextcloud-secured.rule=Host(`nextcloud.luke-else.co.uk`) || Host(`www.nextcloud.luke-else.co.uk`)"
|
|
|
|
- "traefik.http.routers.nextcloud-secured.entrypoints=https"
|
|
|
|
- "traefik.http.routers.nextcloud-secured.tls.certresolver=mytlschallenge"
|
2022-10-31 21:39:29 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
|
2022-06-01 11:10:06 +00:00
|
|
|
db:
|
|
|
|
image: mariadb
|
|
|
|
container_name: nextclouddb
|
|
|
|
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
|
|
|
|
volumes:
|
|
|
|
- ./db:/var/lib/mysql
|
2022-10-31 21:39:29 +00:00
|
|
|
networks:
|
|
|
|
- nextcloud
|
2022-06-01 11:10:06 +00:00
|
|
|
environment:
|
|
|
|
- MYSQL_ROOT_PASSWORD=
|
2022-11-02 18:52:48 +00:00
|
|
|
- MYSQL_USER=nextcloud
|
2022-06-01 11:10:06 +00:00
|
|
|
- MYSQL_PASSWORD=
|
|
|
|
- MYSQL_DATABASE=nextcloud
|
2022-10-31 21:39:29 +00:00
|
|
|
restart: unless-stopped
|
2022-06-01 11:10:06 +00:00
|
|
|
|
2022-10-31 21:39:29 +00:00
|
|
|
networks:
|
|
|
|
services:
|
|
|
|
external: true
|
2022-06-01 11:10:06 +00:00
|
|
|
nextcloud:
|
2022-10-31 21:39:29 +00:00
|
|
|
name: nextcloud
|