two docker-compose .yml in the same network with COMPOSE_PROJECT_NAME
I am trying to have my own network name for my docker-compose files (server.yml and test.yml), as test.yml gets only started from time to time, but needs access to some services in the server.yml. I can make it work with docker-compose -p nameofproject up, but not with COMPOSE_PROJECT_NAME. server.yml version: '2' networks: mynetwork: driver: bridge services: app1: networks: - mynetwork environment: POSTGRES_PASSWORD: somepassword COMPOSE_PROJECT_NAME: serverstack app2: networks: - mynetwork environment: COMPOSE_PROJECT_NAME: serverstack depends_on: - app1 My expectation is that when the container is starting I should see Creating serverstackmynetwork_app_1 Creating serverstackmynetwork_app_2 the network should be named (docker network ls) serverstack_mynetwork just like when I do the following, which actually works docker-compose -p serverstack up And then I can connect just by using docker-compose up with the second file (which works just fine when using the -p option on the server.yml) testing.yml version: '2' networks: testapp_network: external: name: serverstack_mynetwork services: testapp: networks: - testapp_network But using it without -p serverstack on the server.yml I see directories as names Creating directoryofapp1_app1_1 Creating directoryofapp2_app2_1 so COMPOSE_PROJECT_NAME is being omitted and I also cannot connect to the server service though serverstack_mynetwork I did add the COMPOSE_PROJECT_NAME: serverstack after building the image, but I would expect it should work anyhow. What am I missing?
Yesod and docker-compose logs in development mode
Docker compose to always deploy using latest image
JHipster - Doubts in the development using Microservices Architecture
Gogs + Drone getsockopt: connection refused
Concourse result keeps loading
Docker-compose: AttributeError: 'module' object has no attribute 'ssl'
scaling a service with docker compose
Docker Compose apparently ignores COMPOSE_FILE
Where does Docker install gems on a mac
What is the difference between docker-machine and docker-compose?
Docker Compose port issue. Cannot launch docker project on localhost
Name an image built from running a docker-compose file
Race conditions after changing names in docker-compose.yml
Docker compose - image not found
How to work out the hostname that compose gives containers?
docker-compose restart container if service is dead