!LOCAL adapt compose file for local dev

This commit is contained in:
Ethan Paul 2024-04-12 13:45:53 -04:00
parent 2d92c672e2
commit 1eafbc0a66
Signed by: enpaul
GPG Key ID: 9B6D99E4CFA31867
2 changed files with 29 additions and 38 deletions

View File

@ -2,79 +2,70 @@
services:
nginx:
container_name: nginx-nextcloud
build: ./nginx
ports:
- 80:80
- 8080:80
- 443:443
volumes:
- ${NEXTCLOUD_DIR}:/var/www/html
- ${DATA_DIR}:/data
- ./appdata/application:/var/www/html
- ./appdata/data:/data
environment:
- NEXTCLOUD_PHP_FPM_HOST=${NEXTCLOUD_PHP_FPM_HOST}
- NEXTCLOUD_DOMAIN=${NEXTCLOUD_DOMAIN}
- NEXTCLOUD_MAX_UPLOAD_SIZE=${NEXTCLOUD_MAX_UPLOAD_SIZE}
- NEXTCLOUD_PHP_FPM_HOST=nxcloud-server-1:9000
- NEXTCLOUD_DOMAIN=localhost
- NEXTCLOUD_MAX_UPLOAD_SIZE=4G
networks:
- nextcloud
depends_on:
- php-fpm-nextcloud
- redis-nextcloud
- mariadb-nextcloud
- server
- redis
- mariadb
php-fpm-nextcloud:
container_name: php-fpm-nextcloud
server:
build:
context: ./php-fpm
tags:
- localhost/php-fpm-nextcloud:latest
- vcs.enp.one/skylab/nextcloud-server:latest
volumes:
- ${NEXTCLOUD_DIR}:/var/www/html
- ${DATA_DIR}:/data
- ./appdata/application:/var/www/html
- ./appdata/data:/data
networks:
- nextcloud
mariadb-nextcloud:
container_name: mariadb-nextcloud
mariadb:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- ./mariadb:/var/lib/mysql
- ./appdata/database:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASS}
- MYSQL_PASSWORD=${MARIADB_PASS}
- MARIADB_RANDOM_ROOT_PASSWORD=true
- MYSQL_PASSWORD=nextcloud
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
networks:
- nextcloud
redis-nextcloud:
container_name: redis-nextcloud
# image: redis:latest
# keydb is a fork and drop-in replacement for Redis
redis:
image: eqalpha/keydb
restart: unless-stopped
networks:
- nextcloud
cron-nextcloud:
container_name: cron-nextcloud
image: localhost/php-fpm-nextcloud:latest
restart: unless-stopped
cron:
image: vcs.enp.one/skylab/nextcloud-server:latest
command:
- bash
- -c
- "'while true; do php --define apc.enable_cli=1 /var/www/html/cron.php && sleep 300; done'"
- "'while true; do php --define apc.enable_cli=1 /var/www/html/cron.php; sleep 300; done'"
networks:
- nextcloud
user: www-data
entrypoint:
- /bin/bash
volumes:
- ${NEXTCLOUD_DIR}:/var/www/html
- ${DATA_DIR}:/data
- ./appdata/application:/var/www/html
- ./appdata/data:/data
depends_on:
- php-fpm-nextcloud
- redis-nextcloud
- mariadb-nextcloud
- server
- redis
- mariadb
networks:
nextcloud:

View File

@ -1,7 +1,7 @@
FROM docker.io/library/nginx:latest
ENV NEXTCLOUD_DOMAIN=example.com
ENV NEXTCLOUD_PHP_FPM_HOST=php-fpm-nextcloud:9000
ENV NEXTCLOUD_PHP_FPM_HOST=server:9000
ENV NEXTCLOUD_MAX_UPLOAD_SIZE=512M
ADD nginx.conf.template /nginx.conf.template