Answer the question
In order to leave comments, you need to log in
Two different doke-compose instances?
There are two directories, one for running the database, the other for running the web application, how to link the application with the database? For example, through depends_on ..
I don’t want to touch External_links, it is tied to the container, as far as I know
. I tried to do it through networks, but I didn’t understand how to handle it ..
DB:
version: '2'
services:
mysql:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=root
volumes:
- ./data/mysql_db:/var/lib/mysql
ports:
- "33060:3306"
version: '2'
services:
redmine:
image: redmine:3.3.2
ports:
- 8080:3000
environment:
REDMINE_DB_MYSQL: mysql
REDMINE_DB_PASSWORD: root
volumes:
- ./data/redmine:/usr/src/redmine/files
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question