You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
docker-nextcloud/docker-compose.yml

51 lines
1.2 KiB

version: "3"
services:
nextcloud:
## Using Dockerfile because I want tu use 'cron'
## and I need to add it first to the pure image
#image: nextcloud:latest
build: .
container_name: ${NC_CONTAINER_NAME:-nextcloud}
restart: ${NC_RESTART:-unless-stopped}
depends_on:
- db
volumes:
- ${LOCAL_STACK_DIR}/nextcloud/data:/var/www/html
- /etc/timezone:/etc/timezone:ro
networks:
- default
- nextcloud
env_file:
- nextcloud.env
- nc_db.env
environment:
MYSQL_HOST: ${MYSQL_HOST:-db}
REDIS_HOST: ${REDIS_HOST:-redis}
db:
image: ${DB_IMG:-mariadb}:${DB_TAG:-latest}
container_name: ${DB_CONTAINER_NAME:-nextcloud-db}
restart: ${DB_RESTART:-unless-stopped}
volumes:
- ${LOCAL_STACK_DIR}/db/data:/var/lib/mysql
networks:
- nextcloud
env_file:
- nc_db.env
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:
name: ${NETWORK}
nextcloud:
internal: true