Files
Mickael PAPAMICA Asseline e6e9ccfa11 change images to my cdn
2022-09-02 13:31:54 +02:00

81 lines
2.4 KiB
YAML

# Maintainer: Mickael "PAPAMICA" Asseline
# Update: 2022-05-11
#& type: 3
#& title: NextCloud
#& description: A personnal cloud, alternative to Google Drive, etc...
#& note: Website: <a href='https://nextcloud.com/' target='_blank' rel='noopener'>NextCloud.com</a>
#& categories: SelfHosted, PAPAMICA
#& platform: linux
#& logo: https://img.papamica.com/logo/nextcloud.png
#% SERVICE: Name of the service (No spaces or points) [nexcloud]
#% DATA_LOCATION: Data localization (Example: /apps/service) [/_data/apps]
#% URL: Service link (Example: service.papamica.fr or service.com)
#% NETWORK: Your Traefik network (Example: proxy) [proxy]
#% DB_USER: Database user (No spaces or points) [nexcloud]
#% DB_PASSWORD: Password for database user
#% DB_ROOT: Password for database root
#% DATA: Folder of your data
# Work with Portainer
version: "2"
services:
# Nextcloud : https://nextcloud.com/
nextcloud:
image: nextcloud:24
container_name: $SERVICE
restart: always
depends_on:
- nextcloud-db
healthcheck:
test: curl --fail http://localhost:80 || exit 1
interval: 1m
timeout: 30s
retries: 3
environment:
- DB_TYPE=mysql
- DB_NAME=nextcloud
- DB_USER=$DB_USER
- DB_PASSWORD=$DB_PASSWORD
- DB_HOST=nextcloud-db
volumes:
- $DATA:/data
- $DATA_LOCATION/$SERVICE/config:/var/www/html
networks:
- default
labels:
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
- "traefik.enable=true"
- "traefik.http.routers.$SERVICE.entrypoints=https"
- "traefik.http.routers.$SERVICE.rule=Host(`$URL`)"
- "traefik.http.routers.$SERVICE.tls=true"
- "traefik.http.routers.$SERVICE.tls.certresolver=http"
- "traefik.docker.network=$NETWORK"
# Base de donnée
nextcloud-db:
image: mariadb:10.4.12
container_name: $SERVICE-db
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
volumes:
- $DATA_LOCATION/$SERVICE/db:/var/lib/mysql
labels:
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
environment:
- MYSQL_ROOT_PASSWORD=$DB_ROOT
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=$DB_USER
- MYSQL_PASSWORD=$DB_PASSWORD
networks:
- default
networks:
default:
external:
name: $NETWORK