Q
Q
qovalenko2019-02-22 12:03:08
Virtualization
qovalenko, 2019-02-22 12:03:08

How to add link to running docker?

Project starts:

docker-compose
webone:
    image: ubuntu
    container_name: webone
    ports:
        - 3000:80
webtwo:
    image: ubuntu
    container_name: webtwo
    ports:
        - 3001:80
nginx:
    image: nginx
    container_name: nginx
    ports:
        - 80:80
        - 443:443
    links:
        - webone
        - webtwo


Nginx as a proxy works:
I need to add webthree and a link to it in nginx, what is the least way to organize it?
I understand that it is possible to recreate the yml file and restart the project, but I would not like to stop everything.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2019-02-22
@qovalenko

if you change the contents of only one container from the project and do
docker-compose up -d in the folder,
then only the changed container will restart.

H
Hikmat Abdunabiev, 2019-02-22
@Khikmat

Look towards nginx-proxy .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question