Skip to content

Commit

Permalink
Now templating the docker-compose.yml file works perfectly fine.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashackt committed Mar 26, 2017
1 parent 36e40cd commit b98ded3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
- name: eureka-serviceregistry
path_to_jar: "../../spring-cloud-netflix-docker/eureka-serviceregistry/target/eureka-serviceregistry-0.0.1-SNAPSHOT.jar"
port: 8761
map_port_to_host: true
- name: zuul-edgeservice
path_to_jar: "../../spring-cloud-netflix-docker/zuul-edgeservice/target/zuul-edgeservice-0.0.1-SNAPSHOT.jar"
port: 8080
map_port_to_host: true
- name: weatherbackend
path_to_jar: "../../spring-cloud-netflix-docker/weatherbackend/target/weatherbackend-0.0.1-SNAPSHOT.jar"
port: 8090
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,16 @@ version: '3.1'

services:

eureka-serviceregistry:
build: ./eureka-serviceregistry
ports:
- "8761:8761"
tty:
true

# no portbinding here - the actual services should be accessible through Zuul proxy
weatherbackend:
build: ./weatherbackend
tty:
true

# no portbinding here - the actual services should be accessible through Zuul proxy
weatherbackend-second:
build: ./weatherbackend-second
tty:
true

zuul-edgeservice:
build: ./zuul-edgeservice
ports:
- "8080:8080"
tty:
true
{% for service in vars.services %}
{{ service.name }}:
build: ./{{ service.name }}
{% if service.map_port_to_host is defined %}
ports:
- "{{ service.port }}:{{ service.port }}"
{% endif %}
tty:
true
{% endfor %}

networks:
default:
Expand Down

0 comments on commit b98ded3

Please sign in to comment.