awesome-compose/nextcloud-redis-mariadb/docker-compose.yaml
Anca Iordache fb99b4c763 Add nextcloud-redis-mariadb sample
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2020-03-19 11:31:12 +01:00

45 lines
846 B
YAML

version: '3.7'
services:
nc:
image: nextcloud:apache
restart: always
ports:
- 80:80
volumes:
- nc_data:/var/www/html
networks:
- redisnet
- dbnet
environment:
- REDIS_HOST=redis
- MYSQL_HOST=db
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=nextcloud
redis:
image: redis:alpine
restart: always
networks:
- redisnet
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db_data:/var/lib/mysql
networks:
- dbnet
environment:
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_ROOT_PASSWORD=nextcloud
- MYSQL_PASSWORD=nextcloud
volumes:
db_data:
nc_data:
networks:
dbnet:
redisnet: