nxcloud/docker-compose.yml

82 lines
1.9 KiB
YAML
Raw Normal View History

2024-04-06 15:53:06 +00:00
---
services:
nginx:
container_name: nginx-nextcloud
build: ./nginx
2024-04-06 17:09:38 +00:00
ports:
- 80:80
- 443:443
2024-04-06 15:53:06 +00:00
volumes:
- ${NEXTCLOUD_DIR}:/var/www/html
- ${DATA_DIR}:/data
environment:
- NEXTCLOUD_PHP_FPM_HOST=${NEXTCLOUD_PHP_FPM_HOST}
- NEXTCLOUD_DOMAIN=${NEXTCLOUD_DOMAIN}
- NEXTCLOUD_MAX_UPLOAD_SIZE=${NEXTCLOUD_MAX_UPLOAD_SIZE}
2024-04-06 15:53:06 +00:00
networks:
- nextcloud
depends_on:
- php-fpm-nextcloud
- redis-nextcloud
- mariadb-nextcloud
php-fpm-nextcloud:
container_name: php-fpm-nextcloud
build:
context: ./php-fpm
tags:
- localhost/php-fpm-nextcloud:latest
2024-04-06 15:53:06 +00:00
volumes:
- ${NEXTCLOUD_DIR}:/var/www/html
- ${DATA_DIR}:/data
networks:
- nextcloud
mariadb-nextcloud:
container_name: mariadb-nextcloud
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- ./mariadb:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASS}
- MYSQL_PASSWORD=${MARIADB_PASS}
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
networks:
- nextcloud
redis-nextcloud:
container_name: redis-nextcloud
2024-04-06 20:03:16 +00:00
# image: redis:latest
# keydb is a fork and drop-in replacement for Redis
image: eqalpha/keydb
2024-04-06 15:53:06 +00:00
restart: unless-stopped
networks:
- nextcloud
cron-nextcloud:
container_name: cron-nextcloud
image: localhost/php-fpm-nextcloud:latest
restart: unless-stopped
command:
- bash
- -c
- "'while true; do php --define apc.enable_cli=1 /var/www/html/cron.php && sleep 300; done'"
networks:
- nextcloud
user: www-data
volumes:
- ${NEXTCLOUD_DIR}:/var/www/html
- ${DATA_DIR}:/data
depends_on:
- php-fpm-nextcloud
- redis-nextcloud
- mariadb-nextcloud
2024-04-06 15:53:06 +00:00
networks:
nextcloud:
driver: bridge