Created
March 18, 2019 18:49
-
-
Save ties/80cc50d6b954ea912f42787e1d899177 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2.1' | |
services: | |
# | |
# Nextcloud | |
# | |
nextcloud: | |
image: nextcloud | |
depends_on: | |
- nextcloud-db | |
- redis | |
restart: always | |
environment: | |
- TZ=Europe/Amsterdam | |
- NEXTCLOUD_ADMIN_USER=admin | |
- NEXTCLOUD_ADMIN_PASSWORD=${NEXTCLOUD_DB_ROOT_PW} | |
- MYSQL_DATABASE=nextcloud | |
- MYSQL_USER=nextcloud | |
- MYSQL_PASSWORD=${NEXTCLOUD_DB_PW} | |
- MYSQL_HOST=nextcloud-db | |
- NEXTCLOUD_TRUSTED_DOMAINS=cloud.cattle.ml | |
volumes: | |
- /opt/nextcloud/data:/var/www/html/data | |
- /opt/nextcloud/config:/var/www/html/config | |
- /opt/nextcloud/apps:/var/www/html/custom_apps | |
- /opt/nextcloud/themes:/var/www/html/themes | |
networks: | |
- nextcloud | |
- web | |
labels: | |
- "traefik.enable=true" | |
- "traefik.docker.network=web" | |
- "traefik.frontend.rule=Host:cloud.cattle.ml" | |
- "traefik.port:8888" | |
# | |
# Nextcloud database | |
# | |
nextcloud-db: | |
image: mariadb:10 | |
volumes: | |
- /opt/nextcloud/db:/var/lib/mysql | |
environment: | |
- MYSQL_ROOT_PASSWORD=${NEXTCLOUD_DB_ROOT_PW} | |
- MYSQL_DATABASE=nextcloud | |
- MYSQL_USER=nextcloud | |
- MYSQL_PASSWORD=${NEXTCLOUD_DB_PW} | |
networks: | |
- nextcloud | |
# | |
# Redis | |
# | |
redis: | |
image: redis:alpine | |
container_name: redis | |
volumes: | |
- /data/nextcloud/redis:/data | |
networks: | |
- nextcloud | |
networks: | |
nextcloud: | |
driver: bridge | |
web: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment