Cannot deploy using mysql via docker-compose - timeout issue?
I want to install a fresh docker instance using docker-compose.
File looks like this:
version: '3.9'
networks:
nextcloud:
name: nextcloud
driver: bridge
services:
nextcloud:
container_name: nextcloud_app
image: nextcloud:latest
restart: always
ports:
- "8080:80"
environment:
- MYSQL_HOST=db
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=nextcloud
- NEXTCLOUD_ADMIN_USER=admin
- NEXTCLOUD_ADMIN_PASSWORD=nextcloud
- NEXTCLOUD_TRUSTED_DOMAINS=cloud.domain.com
- NEXTCLOUD_DATA_DIR=/cloud/
- REDIS_HOST=redis
volumes:
- /mnt/system/nextcloud:/var/www/html
- /cloud:/cloud
depends_on:
- db
- redis
networks:
- nextcloud
db:
container_name: nextcloud_db
image: mysql:8.4
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
environment:
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=nextcloud
- MYSQL_ROOT_PASSWORD=rootpassword
volumes:
- /mnt/system/nextcloud-db:/var/lib/mysql
networks:
- nextcloud
redis:
container_name: nextcloud_redis
image: redis:latest
restart: always
command: redis-server --appendonly yes
volumes:
- /mnt/system/nextcloud-redis:/data
networks:
- nextcloud
All 3 containers are being deployed, but I cannot create a user. The intial form for creating an admin account is shown, but when I start the installer there, nothing happens and I run into a timeout.
After that, I cannot restart the installation, because nextcloud complains the admin account already exists.
Any help would be much appreciated.