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

57 lines
1.4 KiB

4 years ago
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}
4 years ago
expose:
- 9000
4 years ago
depends_on:
- db
4 years ago
volumes:
- ${LOCAL_STACK_DIR}/nextcloud/data:/var/www/html
- /etc/timezone:/etc/timezone:ro
networks:
- default
- nextcloud
4 years ago
env_file:
- nextcloud.env
- nc_db.env
environment:
4 years ago
MYSQL_HOST: ${MYSQL_HOST:-db}
REDIS_HOST: ${REDIS_HOST:-redis}
4 years ago
db:
image: ${DB_IMG:-mariadb}:${DB_TAG:-latest}
container_name: ${DB_CONTAINER_NAME:-nextcloud-db}
restart: ${DB_RESTART:-unless-stopped}
4 years ago
expose:
- 3306
4 years ago
volumes:
- ${LOCAL_STACK_DIR}/db/data:/var/lib/mysql
networks:
- nextcloud
4 years ago
env_file:
- nc_db.env
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --skip-innodb-read-only-compressed
4 years ago
4 years ago
redis:
image: ${RD_IMG:-redis}:${RD_TAG:-alpine}
container_name: ${RD_CONTAINER_NAME:-nextcloud-redis}
restart: ${RD_RESTART:-unless-stopped}
networks:
- nextcloud
4 years ago
networks:
default:
external:
name: ${NETWORK}
nextcloud:
internal: true