summaryrefslogtreecommitdiff
path: root/Applications/NextCloud/docker-compose.yml
blob: 91f9df7a54bcccd94e2d27de24d18e8aa6881608 (plain)
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
version: "3"

services:
  app:
    image: "nextcloud"
    restart: "unless-stopped"
    environment:
      - "MYSQL_DATABASE=${DB_NAME}"
      - "MYSQL_USER=${DB_USER}"
      - "MYSQL_PASSWORD=${DB_PASSWORD}"
      - "MYSQL_HOST=db"
    volumes:
      - "./volumes/nextcloud:/var/www/html"
      - "${EXTERNAL_STORAGE_PATH_HOST}:${EXTERNAL_STORAGE_PATH_CONTAINER}"
    networks:
      - "internal"
      - "traefik"
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=${TRAEFIK_NETWORK}"
      - "traefik.http.routers.nextcloud.rule=Host(`${DOMAIN}`)"
      - "traefik.http.routers.nextcloud.entrypoints=web"

  db:
    image: "mariadb"
    restart: "unless-stopped"
    command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW"
    environment:
      - "MYSQL_DATABASE=${DB_NAME}"
      - "MYSQL_USER=${DB_USER}"
      - "MYSQL_PASSWORD=${DB_PASSWORD}"
      - "MYSQL_ROOT_PASSWORD=${DB_PASSWORD}"
    volumes:
      - "./volumes/db:/var/lib/mysql"
    networks:
      - "internal"

networks:
  internal:
  traefik:
    name: "${TRAEFIK_NETWORK}"
    external: true