add docker stacks
This commit is contained in:
135
Nextcloud/docker-compose.yaml
Normal file
135
Nextcloud/docker-compose.yaml
Normal file
@@ -0,0 +1,135 @@
|
||||
services:
|
||||
aio-apache:
|
||||
depends_on:
|
||||
aio-nextcloud:
|
||||
condition: service_started
|
||||
required: false
|
||||
aio-notify-push:
|
||||
condition: service_started
|
||||
required: false
|
||||
image: nextcloud/aio-apache:latest
|
||||
init: true
|
||||
ports:
|
||||
- ${APACHE_IP_BINDING}:${APACHE_PORT}:${APACHE_PORT}/tcp
|
||||
- ${APACHE_IP_BINDING}:${APACHE_PORT}:${APACHE_PORT}/udp
|
||||
env_file:
|
||||
- stack.env
|
||||
volumes:
|
||||
- nextcloud_aio_nextcloud:/var/www/html:ro
|
||||
- nextcloud_aio_apache:/mnt/data:rw
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- nextcloud-aio
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /var/log/supervisord
|
||||
- /var/run/supervisord
|
||||
- /usr/local/apache2/logs
|
||||
- /tmp
|
||||
- /home/www-data
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
|
||||
# HTTP redirection to HTTPS
|
||||
- traefik.http.routers.nextcloud.entrypoints=web
|
||||
- traefik.http.routers.nextcloud.rule=Host(`${NEXTCLOUD_URL}`)
|
||||
- traefik.http.middlewares.nextcloud-https-redirect.redirectscheme.scheme=https
|
||||
- traefik.http.routers.nextcloud.middlewares=nextcloud-https-redirect
|
||||
|
||||
# HTTPS config
|
||||
- traefik.http.routers.nextcloud-secure.entrypoints=websecure
|
||||
- traefik.http.routers.nextcloud-secure.rule=Host(`${NEXTCLOUD_URL}`)
|
||||
- traefik.http.routers.nextcloud-secure.tls=true
|
||||
- traefik.http.routers.nextcloud-secure.tls.certresolver=myresolver
|
||||
- traefik.http.services.nextcloud-secure.loadbalancer.server.port=21000
|
||||
|
||||
- traefik.docker.network=proxy
|
||||
|
||||
aio-database:
|
||||
image: nextcloud/aio-postgresql:latest
|
||||
init: true
|
||||
expose:
|
||||
- "5432"
|
||||
volumes:
|
||||
- nextcloud_aio_database:/var/lib/postgresql/data:rw
|
||||
- nextcloud_aio_database_dump:/mnt/data:rw
|
||||
env_file:
|
||||
- stack.env
|
||||
stop_grace_period: 1800s
|
||||
restart: unless-stopped
|
||||
shm_size: 268435456
|
||||
networks:
|
||||
- nextcloud-aio
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /var/run/postgresql
|
||||
|
||||
aio-nextcloud:
|
||||
depends_on:
|
||||
aio-database:
|
||||
condition: service_started
|
||||
required: false
|
||||
aio-redis:
|
||||
condition: service_started
|
||||
required: false
|
||||
image: nextcloud/aio-nextcloud:latest
|
||||
init: true
|
||||
expose:
|
||||
- "9000"
|
||||
- "9001"
|
||||
volumes:
|
||||
- nextcloud_aio_nextcloud:/var/www/html:rw
|
||||
- ${NEXTCLOUD_USER_DIR}:/mnt/ncdata:rw
|
||||
- ${NEXTCLOUD_DOCKER_DIR}:/mnt:rw
|
||||
- ${NEXTCLOUD_TRUSTED_CACERTS_DIR}:/usr/local/share/ca-certificates:ro
|
||||
env_file:
|
||||
- stack.env
|
||||
stop_grace_period: 600s
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- nextcloud-aio
|
||||
|
||||
aio-notify-push:
|
||||
image: nextcloud/aio-notify-push:latest
|
||||
init: true
|
||||
expose:
|
||||
- "7867"
|
||||
volumes:
|
||||
- nextcloud_aio_nextcloud:/nextcloud:ro
|
||||
env_file:
|
||||
- stack.env
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- nextcloud-aio
|
||||
read_only: true
|
||||
|
||||
aio-redis:
|
||||
image: nextcloud/aio-redis:latest
|
||||
init: true
|
||||
expose:
|
||||
- "6379"
|
||||
env_file:
|
||||
- stack.env
|
||||
volumes:
|
||||
- nextcloud_aio_redis:/data:rw
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- nextcloud-aio
|
||||
read_only: true
|
||||
|
||||
volumes:
|
||||
nextcloud_aio_apache:
|
||||
name: nextcloud_aio_apache
|
||||
nextcloud_aio_database:
|
||||
name: nextcloud_aio_database
|
||||
nextcloud_aio_database_dump:
|
||||
name: nextcloud_aio_database_dump
|
||||
nextcloud_aio_nextcloud:
|
||||
name: nextcloud_aio_nextcloud
|
||||
nextcloud_aio_redis:
|
||||
name: nextcloud_aio_redis
|
||||
|
||||
networks:
|
||||
nextcloud-aio:
|
||||
name: nextcloud-aio
|
||||
driver: bridge
|
||||
36
Nextcloud/stack.env
Normal file
36
Nextcloud/stack.env
Normal file
@@ -0,0 +1,36 @@
|
||||
NEXTCLOUD_URL=nextcloud.example.com
|
||||
TZ=America/Toronto
|
||||
|
||||
NEXTCLOUD_DOCKER_DIR=/path/to/nextcloud
|
||||
NEXTCLOUD_DATA_DIR=/path/to/users/data
|
||||
NEXTCLOUD_TRUSTED_CACERTS_DIR=./certificates
|
||||
|
||||
ADMIN_USER=admin
|
||||
ADMIN_PASSWORD=YOUR_ADMIN_PASSWORD
|
||||
|
||||
APACHE_IP_BINDING=0.0.0.0
|
||||
APACHE_PORT=21000
|
||||
APACHE_MAX_TIME=3600
|
||||
APACHE_MAX_SIZE=10737418240
|
||||
|
||||
NEXTCLOUD_UPLOAD_LIMIT=10G
|
||||
POSTGRES_DB=nextcloud_database
|
||||
POSTGRES_HOST=aio-database
|
||||
POSTGRES_PASSWORD=YOUR_DB_PASSWORD
|
||||
POSTGRES_USER=nextcloud
|
||||
|
||||
CLAMAV_ENABLED=false
|
||||
COLLABORA_ENABLED=false
|
||||
FULLTEXTSEARCH_ENABLED=false
|
||||
IMAGINARY_ENABLED=false
|
||||
TALK_ENABLED=false
|
||||
ONLYOFFICE_ENABLED=false
|
||||
|
||||
NEXTCLOUD_HOST=aio-nextcloud
|
||||
NOTIFY_PUSH_HOST=aio-notify-push
|
||||
REDIS_HOST=aio-redis
|
||||
REDIS_HOST_PASSWORD=YOUR_REDIS_PASSWORD
|
||||
|
||||
NC_DOMAIN=${NEXTCLOUD_URL}
|
||||
OVERWRITEHOST=${NC_DOMAIN}
|
||||
OVERWRITEPROTOCOL=https
|
||||
Reference in New Issue
Block a user