119 lines
2.8 KiB
YAML
119 lines
2.8 KiB
YAML
version: '3'
|
|
|
|
networks:
|
|
default:
|
|
external:
|
|
name: nextcloud_net
|
|
|
|
services:
|
|
nextcloud-db:
|
|
image: mariadb:latest
|
|
container_name: nextcloud-db
|
|
hostname: nextcloud-db
|
|
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb_read_only_compressed=OFF
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
volumes:
|
|
- db:/var/lib/mysql
|
|
|
|
phpmyadmin:
|
|
image: phpmyadmin:latest
|
|
container_name: nextcloud-db-web
|
|
links:
|
|
- nextcloud-db:db
|
|
environment:
|
|
PMA_HOST: db
|
|
PMA_PORT: 3306
|
|
PMA_ARBITRARY: 1
|
|
restart: unless-stopped
|
|
ports:
|
|
- 8081:80
|
|
|
|
nextcloud-redis:
|
|
image: redis:alpine
|
|
container_name: nextcloud-redis
|
|
hostname: nextcloud-redis
|
|
restart: unless-stopped
|
|
|
|
nextcloud-app:
|
|
image: nextcloud:fpm-alpine
|
|
container_name: nextcloud-app
|
|
hostname: nextcloud-app
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
- MYSQL_HOST=nextcloud-db
|
|
- REDIS_HOST=nextcloud-redis
|
|
- NEXTCLOUD_DATA_DIR=/var/www/data
|
|
- OVERWRITEPROTOCOL=https
|
|
- OVERWRITECLIURL=${NEXTCLOUD_DOMAIN}
|
|
depends_on:
|
|
- nextcloud-db
|
|
- nextcloud-redis
|
|
volumes:
|
|
- src:/var/www/html
|
|
- data:/var/www/data
|
|
|
|
nextcloud-web:
|
|
image: caddy:latest
|
|
container_name: nextcloud-web
|
|
hostname: nextcloud-web
|
|
restart: unless-stopped
|
|
ports:
|
|
- 8080:80
|
|
volumes:
|
|
- ./.Caddyfile:/etc/caddy/Caddyfile
|
|
- src:/var/www/html:ro
|
|
links:
|
|
- nextcloud-app
|
|
|
|
collabora:
|
|
image: collabora/code:latest
|
|
container_name: nextcloud-collabora
|
|
restart: unless-stopped
|
|
volumes:
|
|
# make sure these exist on your host
|
|
- /etc/localtime:/etc/localtime
|
|
- /etc/timezone:/etc/timezone
|
|
ports:
|
|
- "9980:9980"
|
|
environment:
|
|
- 'server_name=${NEXTCLOUD_DOMAIN}'
|
|
- 'dictionaries=${COLLABRA_DICTIONARIES:-en_US}'
|
|
- extra_params=--o:ssl.enable=true --o:ssl.termination=false
|
|
cap_add:
|
|
- MKNOD
|
|
tty: true
|
|
# nextcloud-cron:
|
|
# image: nextcloud:fpm-alpine
|
|
# container_name: nextcloud-cron
|
|
# hostname: nextcloud-cron
|
|
# restart: unless-stopped
|
|
# volumes:
|
|
# - ./nextcloud-data/:/var/www/html
|
|
# entrypoint: /cron.sh
|
|
# depends_on:
|
|
# - nextcloud-db
|
|
# - nextcloud-redis
|
|
|
|
# if bindings are not desired then comment out (or remove) driver and driveropts for a volume
|
|
volumes:
|
|
db:
|
|
driver: local
|
|
driver_opts:
|
|
o: bind
|
|
type: none
|
|
device: ${HOST_NEXTCLOUD_PARENT_DIR}/nextcloud/db
|
|
src:
|
|
driver: local
|
|
driver_opts:
|
|
o: bind
|
|
type: none
|
|
device: ${HOST_NEXTCLOUD_PARENT_DIR}/nextcloud/src
|
|
data:
|
|
driver: local
|
|
driver_opts:
|
|
o: bind
|
|
type: none
|
|
device: ${HOST_NEXTCLOUD_PARENT_DIR}/nextcloud/user-files
|