Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
2.4 kB
1
Indexable
Never
on: '3.7'

networks:
    default:
        name: ${DEFAULT_NETWORK}
        external: true

services:
    nextcloud:
        container_name: Nextcloud
        stdin_open: true
        tty: true
        image: nextcloud:latest
        hostname: Nextcloud
        # command: bash -c "apt update && apt install -y libmagickcore-6.q16-6-extra"
        volumes:
             - ${DEFAULT_VOLUME_PATH}/Nextcloud:/var/www/html
             - ${DEFAULT_VOLUME_PATH}/Nextcloud/config:/var/www/html/config
             - ${DEFAULT_VOLUME_PATH}/Nextcloud/data:/var/www/html/data/
        labels:
             - "traefik.enable=true"
             - "traefik.network=${DEFAULT_NETWORK}"
             - "traefik.http.routers.nextcloud.rule=Host(`${NEXTCLOUD_DOMAIN}`)"
             - "traefik.http.routers.nextcloud.entrypoints=websecure"
             - "traefik.http.routers.nextcloud.tls.certresolver=letsencryptresolver"
             - "traefik.http.routers.nextcloud.middlewares=nextcloudMiddleware"
             - "traefik.http.middlewares.nextcloudMiddleware.headers.STSPreload=true"
             - "traefik.http.middlewares.nextcloudMiddleware.headers.STSSeconds=31536000"
             #- "traefik.http.middlewares.nextcloudMiddleware.redirectscheme.permanent=true"
             #- "traefik.http.middlewares.nextcloudMiddleware.replacepathregex.regex=https://(.*)/.well-known/(card|cal)dav"
             #- "traefik.http.middlewares.nextcloudMiddleware.replacepathregex.replacement=https://$$1/remote.php/dav/"
        environment:
             - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
             - MYSQL_DATABASE=${MYSQL_NEXTCLOUD_DATABASE}
             - MYSQL_USER=${MYSQL_NEXTCLOUD_USERNAME}
             - MYSQL_PASSWORD=${MYSQL_NEXTCLOUD_PASSWORD}
        networks:
             - default
        restart: always
    nextclouddb:
        container_name: Nextcloud-DB
        stdin_open: true
        tty: true
        image: mariadb
        hostname: Nextcloud-DB
        # command: --skip-grant-tables
        volumes:
             - ${DEFAULT_VOLUME_PATH}/Nextcloud-DB/:/var/lib/mysql
        environment:
             - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
             - MYSQL_DATABASE=${MYSQL_NEXTCLOUD_DATABASE}
             - MYSQL_USER=${MYSQL_NEXTCLOUD_USERNAME}
             - MYSQL_PASSWORD=${MYSQL_NEXTCLOUD_PASSWORD}
        networks:
             - default
        restart: always