Use short syntax for volumes, remove extra port entries

This commit is contained in:
Konstantinos Sideris 2018-01-02 19:16:26 +02:00
parent 2b9c35308f
commit 5166c5c3b5
2 changed files with 11 additions and 56 deletions

View file

@ -92,14 +92,9 @@ For more information refer to the official docker-compose [documentation](https:
# Use the common Dockerfile for all the dendrite components. # Use the common Dockerfile for all the dendrite components.
build: ./ build: ./
volumes: volumes:
- type: bind - ..:/build
source: ../
target: /build
depends_on: depends_on:
- another_component - another_component
networks: networks:
- internal - internal
# Define which ports to expose to the internal network.
ports:
- 1234
``` ```

View file

@ -6,9 +6,7 @@ services:
entrypoint: ["bash", "./docker/services/monolith.sh"] entrypoint: ["bash", "./docker/services/monolith.sh"]
build: ./ build: ./
volumes: volumes:
- type: bind - ..:/build
source: ../
target: /build
networks: networks:
- internal - internal
depends_on: depends_on:
@ -23,9 +21,7 @@ services:
entrypoint: ["bash", "./docker/services/client-api-proxy.sh"] entrypoint: ["bash", "./docker/services/client-api-proxy.sh"]
build: ./ build: ./
volumes: volumes:
- type: bind - ..:/build
source: ../
target: /build
networks: networks:
- internal - internal
depends_on: depends_on:
@ -43,16 +39,12 @@ services:
entrypoint: ["bash", "./docker/services/client-api.sh"] entrypoint: ["bash", "./docker/services/client-api.sh"]
build: ./ build: ./
volumes: volumes:
- type: bind - ..:/build
source: ../
target: /build
depends_on: depends_on:
- postgres - postgres
- room_server - room_server
networks: networks:
- internal - internal
ports:
- 7771
media_api: media_api:
container_name: dendrite_media_api container_name: dendrite_media_api
@ -60,15 +52,11 @@ services:
entrypoint: ["bash", "./docker/services/media-api.sh"] entrypoint: ["bash", "./docker/services/media-api.sh"]
build: ./ build: ./
volumes: volumes:
- type: bind - ..:/build
source: ../
target: /build
depends_on: depends_on:
- postgres - postgres
networks: networks:
- internal - internal
ports:
- 7774
public_rooms_api: public_rooms_api:
container_name: dendrite_public_rooms_api container_name: dendrite_public_rooms_api
@ -76,15 +64,11 @@ services:
entrypoint: ["bash", "./docker/services/public-rooms-api.sh"] entrypoint: ["bash", "./docker/services/public-rooms-api.sh"]
build: ./ build: ./
volumes: volumes:
- type: bind - ..:/build
source: ../
target: /build
depends_on: depends_on:
- postgres - postgres
networks: networks:
- internal - internal
ports:
- 7775
sync_api: sync_api:
container_name: dendrite_sync_api container_name: dendrite_sync_api
@ -92,15 +76,11 @@ services:
entrypoint: ["bash", "./docker/services/sync-api.sh"] entrypoint: ["bash", "./docker/services/sync-api.sh"]
build: ./ build: ./
volumes: volumes:
- type: bind - ..:/build
source: ../
target: /build
depends_on: depends_on:
- postgres - postgres
networks: networks:
- internal - internal
ports:
- 7773
room_server: room_server:
container_name: dendrite_room_server container_name: dendrite_room_server
@ -108,15 +88,11 @@ services:
entrypoint: ["bash", "./docker/services/room-server.sh"] entrypoint: ["bash", "./docker/services/room-server.sh"]
build: ./ build: ./
volumes: volumes:
- type: bind - ..:/build
source: ../
target: /build
depends_on: depends_on:
- postgres - postgres
networks: networks:
- internal - internal
ports:
- 7770
federation_api_proxy: federation_api_proxy:
container_name: dendrite_federation_api_proxy container_name: dendrite_federation_api_proxy
@ -124,9 +100,7 @@ services:
entrypoint: ["bash", "./docker/services/federation-api-proxy.sh"] entrypoint: ["bash", "./docker/services/federation-api-proxy.sh"]
build: ./ build: ./
volumes: volumes:
- type: bind - ..:/build
source: ../
target: /build
depends_on: depends_on:
- postgres - postgres
- federation_api - federation_api
@ -143,15 +117,11 @@ services:
entrypoint: ["bash", "./docker/services/federation-api.sh"] entrypoint: ["bash", "./docker/services/federation-api.sh"]
build: ./ build: ./
volumes: volumes:
- type: bind - ..:/build
source: ../
target: /build
depends_on: depends_on:
- postgres - postgres
networks: networks:
- internal - internal
ports:
- 7772
federation_sender: federation_sender:
container_name: dendrite_federation_sender container_name: dendrite_federation_sender
@ -159,15 +129,11 @@ services:
entrypoint: ["bash", "./docker/services/federation-sender.sh"] entrypoint: ["bash", "./docker/services/federation-sender.sh"]
build: ./ build: ./
volumes: volumes:
- type: bind - ..:/build
source: ../
target: /build
depends_on: depends_on:
- postgres - postgres
networks: networks:
- internal - internal
ports:
- 7776
postgres: postgres:
container_name: dendrite_postgres container_name: dendrite_postgres
@ -179,8 +145,6 @@ services:
environment: environment:
POSTGRES_PASSWORD: itsasecret POSTGRES_PASSWORD: itsasecret
POSTGRES_USER: dendrite POSTGRES_USER: dendrite
ports:
- 5432
networks: networks:
- internal - internal
@ -188,8 +152,6 @@ services:
container_name: dendrite_zk container_name: dendrite_zk
hostname: zookeeper hostname: zookeeper
image: zookeeper image: zookeeper
ports:
- 2181
networks: networks:
- internal - internal
@ -203,8 +165,6 @@ services:
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181" KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
depends_on: depends_on:
- zookeeper - zookeeper
ports:
- 9092
networks: networks:
- internal - internal