nextcloud

This commit is contained in:
Braden Jageman 2024-04-10 13:43:42 -04:00
parent 94ae6a25f9
commit 15a6819256
5 changed files with 75 additions and 1 deletions

View File

@ -199,7 +199,7 @@ services:
image: wordpress
restart: always
ports:
- 8080:80
- 8089:80
environment:
WORDPRESS_DB_HOST: db-botc
WORDPRESS_DB_USER: exampleuser
@ -243,7 +243,48 @@ services:
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- db-home:/var/lib/mysql
#Nextcloud
nc-db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- nc-db:/var/lib/mysql
env_file:
- ./nextcloud/db.env
nc-redis:
image: redis
restart: always
nc-app:
build: ./nextcloud/app
restart: always
ports:
- 5234:80
volumes:
- nextcloud:/var/www/html
- /media/storage/Cloud/Nextcloud:/storage
environment:
- NEXTCLOUD_DATA_DIR=/storage
- MYSQL_HOST=nc-db
- VIRTUAL_HOST=cloud.${DOMAIN}
env_file:
- ./nextcloud/db.env
depends_on:
- nc-db
- nc-redis
cron:
build: ./nextcloud/app
restart: always
volumes:
- nextcloud:/var/www/html
entrypoint: /cron.sh
depends_on:
- nc-db
- nc-redis
volumes:
nc-db:
nextcloud:
wordpress-home:
db-home:
wordpress-botc:

15
nextcloud/app/Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM nextcloud:apache
COPY redis.config.php /usr/src/nextcloud/config/redis.config.php
ARG NEXTCLOUD_DATA_DIR="/storage/"
RUN echo ${NEXTCLOUD_DATA_DIR}
RUN mkdir -p ${NEXTCLOUD_DATA_DIR}; \
chown -R www-data:root ${NEXTCLOUD_DATA_DIR}; \
chmod -R g=u ${NEXTCLOUD_DATA_DIR}
VOLUME ${NEXTCLOUD_DATA_DIR}
#ENTRYPOINT ["/entrypoint.sh"]
#CMD ["php-fpm"]

View File

@ -0,0 +1,4 @@
FROM nextcloud:apache
COPY redis.config.php /usr/src/nextcloud/config/redis.config.php

View File

@ -0,0 +1,10 @@
<?php
$CONFIG = array (
'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'filelocking.enabled' => 'true',
'redis' => array(
'host' => 'redis',
'port' => 6379,
),
);

4
nextcloud/db.env Normal file
View File

@ -0,0 +1,4 @@
MYSQL_ROOT_PASSWORD=neurobomber
MYSQL_PASSWORD=ncpass
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud