diff --git a/.env.example b/.env.example index 32190f5..42a6f0f 100644 --- a/.env.example +++ b/.env.example @@ -8,6 +8,7 @@ NETWORK=webservices NC_CONTAINER_NAME= NC_RESTART= MYSQL_HOST= +REDIS_HOST= # db MYSQL_ROOT_PASSWORD= @@ -17,3 +18,9 @@ DB_IMG= DB_TAG= DB_CONTAINER_NAME= DB_RESTART= + +# redis (optional) +RD_IMG= +RD_TAG= +RD_CONTAINER_NAME= +RD_RESTART= diff --git a/docker-compose.yml b/docker-compose.yml index b36030c..4a8e0d4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,7 +20,8 @@ services: - nextcloud.env - nc_db.env environment: - MYSQL_HOST: ${MYSQL_HOST:-nextcloud-db} + MYSQL_HOST: ${MYSQL_HOST:-db} + REDIS_HOST: ${REDIS_HOST:-redis} db: image: ${DB_IMG:-mariadb}:${DB_TAG:-latest} @@ -35,6 +36,13 @@ services: environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} + redis: + image: ${RD_IMG:-redis}:${RD_TAG:-alpine} + container_name: ${RD_CONTAINER_NAME:-nextcloud-redis} + restart: ${RD_RESTART:-unless-stopped} + networks: + - nextcloud + networks: default: external: diff --git a/nextcloud.env.example b/nextcloud.env.example index 31de005..3e3d12c 100644 --- a/nextcloud.env.example +++ b/nextcloud.env.example @@ -2,7 +2,7 @@ NEXTCLOUD_ADMIN_USER= NEXTCLOUD_ADMIN_PASSWORD= NEXTCLOUD_DATA_DIR=/var/www/html/data -NEXTCLOUD_TABLE_PREFIX= +NEXTCLOUD_TABLE_PREFIX=nc_ # Reverse-proxy and certbot VIRTUAL_HOST=subdomain.domain.tld