Initial Nextcloud docker-compose.yml

This commit is contained in:
Kris Lamoureux 2024-04-21 01:41:20 -04:00
commit 0abc5cc6ba
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
3 changed files with 77 additions and 0 deletions

12
LICENSE Normal file
View File

@ -0,0 +1,12 @@
Copyright (C) 2024 by Kris Lamoureux <kris@lamoureux.io>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

36
README.md Normal file
View File

@ -0,0 +1,36 @@
# Nextcloud Deployment Repository
This repository contains configurations for deploying Nextcloud using Docker.
Nextcloud is an open-source platform that provides secure data storage,
sharing, and access across devices. It is a self-hosted alternative to cloud
storage services and offers features like file sharing, calendar and contact
management, and collaborative editing tools.
## Docker Configuration
- `IMAGE`: Specifies the Docker image for Nextcloud (default: `nextcloud`).
- `VERSION`: Specifies the tag of the Docker image (default: `latest`).
- `NAME`: Sets the name of the Docker container (default: `nextcloud`).
## Nextcloud Configuration
- `PHP_MEMORY_LIMIT`: Sets the memory limit for PHP processes (default: `1024M`).
## Traefik Configuration
- `ROUTER`: Defines the router name for Traefik to use (default: `nextcloud`).
- `DOMAIN`: Specifies the domain for accessing Nextcloud (default: `cloud.local.krislamo.org`).
- `ENTRYPOINT`: Configures the Traefik entrypoint (default: `web`).
- `ENABLE_TLS`: Toggles TLS encryption (default: `false`).
- `CONTAINER_PORT`: Specifies the HTTP port used for Traefik (default: `80`).
- `MIDDLEWARES`: Lists the middlewares applied to the Nextcloud service (default: `nextcloud-webdav`).
## Network Configuration
- `NETWORK`: Designates the Docker network to be used (default: `traefik`).
## Volume Configuration
- `DATA`: Required. Specifies the path for persistent data storage for Nextcloud.
## License
This project is released under the 0BSD license, which allows for unrestricted
use, modification, and distribution.

29
docker-compose.yml Normal file
View File

@ -0,0 +1,29 @@
version: '3.8'
networks:
traefik:
external: true
services:
nextcloud:
image: "${IMAGE:-nextcloud}:${VERSION:-latest}"
container_name: "${NAME:-nextcloud}"
environment:
PHP_MEMORY_LIMIT: "${PHP_MEMORY_LIMIT:-1024M}"
labels:
- "traefik.http.routers.${ROUTER:-nextcloud}.rule=Host(`${DOMAIN:-cloud.local.krislamo.org}`)"
- "traefik.http.routers.${ROUTER:-nextcloud}.entrypoints=${ENTRYPOINT:-web}"
- "traefik.http.routers.${ROUTER:-nextcloud}.tls=${ENABLE_TLS:-false}"
- "traefik.http.routers.${ROUTER:-nextcloud}.middlewares=${MIDDLEWARES:-nextcloud-webdav}"
- "traefik.http.services.${ROUTER:-nextcloud}.loadbalancer.server.port=${CONTAINER_PORT:-80}"
- "traefik.http.middlewares.${ROUTER:-nextcloud}-webdav.redirectregex.regex=https://(.*)/.well-known/(card|cal)dav"
- "traefik.http.middlewares.${ROUTER:-nextcloud}-webdav.redirectregex.replacement=https://$${1}/remote.php/dav/"
- "traefik.http.middlewares.${ROUTER:-nextcloud}-webdav.redirectregex.permanent=true"
- "traefik.docker.network=${NETWORK:-traefik}"
- "traefik.enable=${ENABLE:-true}"
networks:
- "${NETWORK:-traefik}"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- "${DATA:?}:/var/www/html"