You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.6 KiB

#Source: https://www.reddit.com/r/NextCloud/comments/vyil8b/nextcloud_redis_postgres_collabora_the_holy_grail/
---
version: "2"
services:
nextcloud:
image: docker.io/linuxserver/nextcloud:latest #Already on PHP8
container_name: nextcloud
hostname: nextcloud
network_mode: # so instances can talk to each other by name instead of IP, set them all on the same network_mode
environment:
- PUID=1000
- PGID=1000
- TZ=America/Toronto # set as appropriate
- PHP_UPLOAD_LIMIT=8G # no need to futz with configs to fix the upload limit
- PHP_MEMORY_LIMIT=8G # same as above
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_HOST_PASSWORD=<REDIS PASSWORD>
volumes:
- ./nextcloud/config:/config
- ./nextcloud/data:/data
ports:
- 8443:443
depends_on:
- postgres
restart: unless-stopped
collabora:
image: collabora/code
container_name: collabora
hostname: collabora
network_mode: stacks
ports:
- 9980:9980
environment:
- domain= #Optional
- username= #Collabora username, make this up
- password= #Collabora password, make this up
# env_file: code.env
depends_on:
- nextcloud
restart: unless-stopped
postgres:
image: docker.io/postgres
container_name: postgres
hostname: postgres
network_mode: # See above
environment:
- PUID=1000
- PGID=1000
- POSTGRES_PASSWORD= # generate a password
- TZ=America/Toronto # set as appropriate
#- POSTGRES_PASSWORD
#- POSTGRES_USER
#- POSTGRES_DB
#- POSTGRES_INITDB_ARGS
#- POSTGRES_INITDB_WALDIR
#- POSTGRES_HOST_AUTH_METHOD
#- PGDATA="/var/lib/postgresql/data" # I CANNOT STRESS THE IMPORTANCE OF THIS AND THE VOLUME
volumes:
#- ./postgres/postgres:/var/lib/postgresql
- ./postgres/data:/var/lib/postgresql/data # Without EXPLICITLY declaring a Data folder, you risk losing your stuff in the docker_volumes graveyard, or worse pruning, because WOW
restart: unless-stopped
adminer:
image: docker.io/adminer
container_name: adminer
hostname: adminer
network_mode: # See above
ports:
- 12345:8080 # Because you're likely to have other things running on that path port already.
restart: unless-stopped
redis:
image: docker.io/redis
container_name: redis
hostname: redis
network_mode: # See above
environment:
- PUID=1000
- PGID=1000
- TZ=America/Toronto
command: redis-server --requirepass <REDIS PASSWORD>
restart: unless-stopped