
ffmpeg image and flask app in two different containers in Docker compose.
#Setup wizard for webtrees how to

Since the service name in the docker-compose.yml is mysql, the required hostname is mysql.īasically you need to have all the containers (mysql DB server, mysql client and application) in the same Docker network. In the web interface of web trees on you can make it connect to the mysql container with the following configuration, so it will connect to it through the docker network: What this will do is spin up a mysql container and a webtrees container according to the configuration you specified in your question with a network called my-network. To run the containers, use: docker-compose up -detach I set up the configuration you require like this: version: '3.0' With the amount of configuration required, I'd recommend setting up a docker-compose.yml instead. Name should be db, because webtrees relies on that hostname for DB:ĭocker run -name db -network user-network -e MYSQL_ROOT_PASSWORD=my-secret-pw -e MYSQL_DATABASE=webtrees -e MYSQL_USER=my_user -e MYSQL_PASSWORD=my_pwd -d mysql:5.Regarding your first question, the -link option for docker run is deprecated according to the documentation, so I wouldn't recommend using it. Regarding your first question, the -link option for docker run is deprecated according to the documentation, so I wouldn't recommend using it. I tried using the official mysql docker image as follows: docker run -name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -e MYSQL_DATABASE=webtrees -e MYSQL_USER=my_user -e MYSQL_PASSWORD=my_pwd -d mysql:5.5īut then I don't know how to link webtrees docker container with the mysql container.Īlso, how can I use the mysql client? the documentation gives this example, but I don't understand what are the correct parameters for netowrk and -h: $ docker run -it -network some-network -rm mysql mysql -hsome-mysql -uexample-user -p How I correctly link these two docker containers? However the webtrees container cannot access the mysql server.

The database user must have all access rights toĬreate the necessary database and tables. The -link parameter it is sufficient to set as database hostname dbĪnd port 3306. The database in an other container could be established.


Using the -link parameter a direct connection to Instead you have to use a separate MySQL instance. The image does not contain a MySQL database. They suggest connecting to a mysql docker using -link mysql:db, as follows: docker run -d -p 80:80 -name webtrees -link mysql:db -v /webtrees/data:/var/www/html/data -v /webtrees/media:/var/www/html/media -e DISABLE_SSL=TRUE -e PORT=80 -restart always dtjs48jkt/webtrees
