-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (47 loc) · 1.35 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
version: '3.4'
networks:
weather-bridge:
driver: bridge
volumes:
cache:
driver: local
services:
weather-traefik:
image: traefik:v2.10.1
container_name: weather-traefik
hostname: weather-traefik
command:
- --api
- --providers.docker.exposedbydefault=false
- --entrypoints.web2.address=:8080
labels:
traefik.enable: true
traefik.http.routers.traefik.rule: Host(`weather-traefik`) || Host(`localhost`)
traefik.http.routers.traefik.entrypoints: web2
traefik.http.routers.traefik.service: api@internal
traefik.http.routers.traefik.middlewares: auth
traefik.http.middlewares.auth.basicauth.users: admin:$$apr1$$vO3/IDvg$$JrbhU9NSQub83/mQu9/fP1
ports:
- 80:80
- 443:443
- 127.0.0.1:9999:8080
volumes:
- ./config/traefik:/etc/traefik
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- weather-bridge
weather-example:
scale: 5
build:
context: .
dockerfile: examples/TraefikExample/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
labels:
- "traefik.enable=true"
- "traefik.http.routers.weather-example.rule=Host(`localhost`)"
- "traefik.http.services.weather-example.loadbalancer.server.port=80"
depends_on:
- weather-traefik
networks:
- weather-bridge