可以使用的
version: '2'
services:
db_nextcloud:
container_name: db_nextcloud
image: mysql:5.6
volumes:
- "~/www/next-cloud/mysqldb:/var/lib/mysql"
restart: always
ports:
- "3309:3306"
environment:
MYSQL_ROOT_PASSWORD: nextcloud123
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_PASSWORD: nextcloud123
networks:
- default
nextcloud:
container_name: nextcloud
depends_on:
- db_nextcloud
image: nextcloud
volumes:
- ~/www/next-cloud/data:/var/www/html/data
ports:
- "8888:80"
restart: always
networks:
- default
networks:
default: