-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an additional service for traefik 2 testing
- Loading branch information
1 parent
7621db9
commit 06aa463
Showing
9 changed files
with
133 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TRAEFIK_NETWORK=my127ws |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: '3' | ||
services: | ||
traefik: | ||
container_name: my127ws-proxy2 | ||
build: traefik | ||
restart: unless-stopped | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
labels: | ||
- traefik.enable=true | ||
- traefik.http.routers.traefik.rule=Host(`my127.site`) | ||
- traefik.http.services.traefik.loadbalancer.server.port=8080 | ||
- co.elastic.logs/module=traefik | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- ~/.config/my127ws/proxy:/config | ||
- ./traefik/root/tls:/tls | ||
networks: | ||
- private | ||
- shared | ||
networks: | ||
private: | ||
external: false | ||
shared: | ||
external: | ||
name: $TRAEFIK_NETWORK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
DIR="" | ||
|
||
main() | ||
{ | ||
if [ "$1" = "enable" ]; then | ||
enable | ||
exit | ||
fi | ||
|
||
if [ "$1" = "disable" ]; then | ||
disable | ||
exit | ||
fi | ||
|
||
if [ "$1" = "restart" ]; then | ||
restart | ||
exit | ||
fi | ||
} | ||
|
||
enable() | ||
( | ||
cd "$DIR" | ||
|
||
if ! docker ps | grep my127ws-proxy2 > /dev/null; then | ||
|
||
if [ ! -d "traefik/root/tls" ]; then | ||
run mkdir -p traefik/root/tls | ||
fi | ||
|
||
run curl --fail --location --output traefik/root/tls/my127.site.crt "$(ws global config get global.service.proxy.https.crt)" | ||
run curl --fail --location --output traefik/root/tls/my127.site.key "$(ws global config get global.service.proxy.https.key)" | ||
run docker-compose -p my127ws-proxy2 up --force-recreate --build -d traefik | ||
fi | ||
) | ||
|
||
disable() | ||
( | ||
cd "$DIR" | ||
|
||
if docker ps | grep my127ws-proxy2 > /dev/null; then | ||
run docker-compose -p my127ws-proxy2 rm --stop --force traefik | ||
fi | ||
) | ||
|
||
restart() | ||
{ | ||
disable | ||
enable | ||
} | ||
|
||
bootstrap() | ||
{ | ||
DIR="$(cd "$(dirname "$0")" && pwd)" | ||
# shellcheck source=../../lib/sidekick.sh | ||
source "$DIR/../../lib/sidekick.sh" | ||
} | ||
|
||
bootstrap | ||
main "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM traefik:2.7 | ||
|
||
COPY root / |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
tls: | ||
stores: | ||
default: | ||
defaultCertificate: | ||
certFile: /tls/my127.site.crt | ||
keyFile: /tls/my127.site.key |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
providers: | ||
file: | ||
directory: /config | ||
watch: true | ||
docker: | ||
exposedByDefault: false | ||
|
||
api: | ||
dashboard: true | ||
insecure: true | ||
|
||
accessLog: {} | ||
log: {} | ||
|
||
entryPoints: | ||
http: | ||
address: ":80" | ||
https: | ||
address: ":443" | ||
http: | ||
tls: {} | ||
|
||
inactive.tracing: | ||
jaeger: | ||
samplingServerURL: http://jaeger:5778/sampling | ||
localAgentHostPort: jaeger:6831 |