-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
58 lines (54 loc) · 1.34 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: '3.7'
services:
traefik_init:
container_name: traefik_init
image: traefik:1.7-alpine
command:
- "storeconfig"
- "--api"
- "--entrypoints=Name:http Address::80"
- "--defaultentrypoints=http"
- "--consul"
- "--consul.endpoint=consul:8500"
- "--consul.prefix=traefik"
depends_on:
- consul
traefik:
container_name: traefik
image: traefik:1.7-alpine
depends_on:
- traefik_init
- consul
command:
- "--consul"
- "--consul.endpoint=consul:8500"
- "--consul.prefix=traefik"
- "--consulcatalog.endpoint=consul:8500"
- "--consulcatalog.watch=true"
- "--consulcatalog.frontEndRule=PathPrefixStrip:/{{.ServiceName}}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 80:80
- 8080:8080
consul:
container_name: consul
image: consul:latest
command: agent -dev
volumes:
- .docker/consul/data:/consul/data
environment:
- CONSUL_LOCAL_CONFIG={"datacenter":"eu_west","server":true}
- CONSUL_BIND_INTERFACE=eth0
- CONSUL_CLIENT_INTERFACE=eth0
ports:
- 8500:8500
# web_api:
# container_name: sampleapi
# build: ./Sample.Api
# depends_on:
# - consul
# environment:
# - ASPNETCORE_URLS=http://*:80
# - Consul__address=http://consul:8500
# - Consul__serviceAddress=sampleapi