services: db: container_name: cc-db image: mysql:8.0.22 command: ["--default-authentication-plugin=mysql_native_password"] environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} MYSQL_DATABASE: ${MYSQL_DATABASE} MYSQL_USER: ${MYSQL_USER} MYSQL_PASSWORD: ${MYSQL_PASSWORD} ports: - "127.0.0.1:3336:3306" volumes: - ${DATADIR}/sql-init:/docker-entrypoint-initdb.d # - ${DATADIR}/sqldata:/var/lib/mysql cap_add: - SYS_NICE phpmyadmin: container_name: cc-phpmyadmin image: phpmyadmin environment: - PMA_HOST=cc-db - PMA_USER=root - PMA_PASSWORD=${MYSQL_ROOT_PASSWORD} ports: - "127.0.0.1:${PHPMYADMIN_PORT}:80" depends_on: - db