Add network names

This commit is contained in:
Andrea Cavalli 2021-12-01 19:37:47 +01:00
parent 71ec5b20ee
commit 14a3ec94fb

View File

@ -27,7 +27,6 @@ services:
database: database:
image: postgres image: postgres
container_name: postgres01 container_name: postgres01
hostname: database
env_file: database.env env_file: database.env
ports: ports:
- "5432:5432" - "5432:5432"
@ -36,7 +35,6 @@ services:
es01: es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.15.2 image: docker.elastic.co/elasticsearch/elasticsearch:7.15.2
container_name: es01 container_name: es01
hostname: searchengine
environment: environment:
- node.name=es01 - node.name=es01
- cluster.name=es-docker-cluster - cluster.name=es-docker-cluster
@ -102,5 +100,7 @@ volumes:
networks: networks:
elastic: elastic:
driver: bridge driver: bridge
name: searchengine
database: database:
driver: bridge driver: bridge
name: database