Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit f27716f8 authored by Nicolas Gelot's avatar Nicolas Gelot
Browse files

feat: add local support without created external volumes or networks

parent f85e8717
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ COMPOSE_FILE=docker-compose.yml:docker-compose.local.yml

# Server
DOMAIN=localhost
SHARED_STORAGE_PATH=./nextcloud-shared-storage
SHARED_STORAGE_PATH=/mnt/shared_storage/nextcloud

# mail
SMTP_SECURE=tls
+0 −1
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@ By default, the `slim` Murena Workspace is configured.
`slim` Murena Workspace
```
cp .env.example .env
mkdir -p nextcloud-shared-storage/{config,data}
docker compose up --build -d
```

+17 −1
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ services:
      interval: 10s
      timeout: 5s
      retries: 5
    networks:
      - worker-network

  redis:
    image: redis:7.4-alpine
@@ -22,10 +24,14 @@ services:
      interval: 10s
      timeout: 5s
      retries: 5
    networks:
      - worker-network

  syslog:
    image: jumanjiman/rsyslog
    restart: unless-stopped
    networks:
      - worker-network

  nextcloud:
    build:
@@ -53,5 +59,15 @@ services:
    depends_on:
      - nextcloud

volumes:
volumes: !override
  db:
  nextcloud-config:
  nextcloud-data:

networks:
  proxy-network:
    external: false
    name: proxy-network
  worker-network:
    external: false
    name: worker-network
+15 −14
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ services:
      - nextcloud-data:/var/www/html/data
    networks:
      - worker-network
    hostname: ${DB_USER}-nextcloud
    deploy:
      placement:
        constraints:
@@ -46,7 +47,7 @@ services:
  nginx:
    image: ${NGINX_DOCKER_IMG}
    environment:
      NEXTCLOUD_ADDR: ${COMPOSE_PROJECT_NAME}_nextcloud:9000
      NEXTCLOUD_ADDR: ${DB_USER}-nextcloud:9000
      DOMAIN: ${DOMAIN}
    volumes:
      - nextcloud-data:/var/www/html/data
@@ -59,15 +60,15 @@ services:
          - node.role == worker
    labels:
      - traefik.enable=true
        - traefik.http.routers.${COMPOSE_PROJECT_NAME:-nextcloud}.rule=Host(`${DOMAIN}`)
        - traefik.http.routers.${COMPOSE_PROJECT_NAME:-nextcloud}.entrypoints=websecure
        - traefik.http.routers.${COMPOSE_PROJECT_NAME:-nextcloud}.tls.certresolver=letsencrypt
        - traefik.http.routers.${COMPOSE_PROJECT_NAME:-nextcloud}.middlewares=nextcloud-headers@file
        - traefik.http.routers.${COMPOSE_PROJECT_NAME:-nextcloud}-http.rule=Host(`${DOMAIN}`)
        - traefik.http.routers.${COMPOSE_PROJECT_NAME:-nextcloud}-http.entrypoints=web
        - traefik.http.routers.${COMPOSE_PROJECT_NAME:-nextcloud}-http.middlewares=https-redirect
      - traefik.http.routers.${DB_USER}-nextcloud.rule=Host(`${DOMAIN}`)
      - traefik.http.routers.${DB_USER}-nextcloud.entrypoints=websecure
      - traefik.http.routers.${DB_USER}-nextcloud.tls.certresolver=letsencrypt
      - traefik.http.routers.${DB_USER}-nextcloud.middlewares=nextcloud-headers@file
      - traefik.http.routers.${DB_USER}-nextcloud-http.rule=Host(`${DOMAIN}`)
      - traefik.http.routers.${DB_USER}-nextcloud-http.entrypoints=web
      - traefik.http.routers.${DB_USER}-nextcloud-http.middlewares=https-redirect
      - traefik.http.middlewares.https-redirect.redirectscheme.scheme=https
        - traefik.http.services.${COMPOSE_PROJECT_NAME:-nextcloud}.loadbalancer.server.port=80
      - traefik.http.services.${DB_USER}-nextcloud.loadbalancer.server.port=80

networks:
  proxy-network:
@@ -83,10 +84,10 @@ volumes:
    driver_opts:
      type: none
      o: bind
      device: "${SHARED_STORAGE_PATH}/config/"
      device: "${SHARED_STORAGE_PATH}/config"
  nextcloud-data:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "${SHARED_STORAGE_PATH}/data/"
      device: "${SHARED_STORAGE_PATH}/data"