add a frontend reference
parent
465ee6f9ce
commit
9b13cfdf46
|
|
@ -0,0 +1,41 @@
|
||||||
|
# Traefik reverse proxy for analysis framework
|
||||||
|
|
||||||
|
## Usage (default: http)
|
||||||
|
|
||||||
|
1. `cd traefik`
|
||||||
|
2. `editor docker-compose.yml`
|
||||||
|
* Adjust the *traefik.frontend.rule* label for the traefik dashboard
|
||||||
|
* Default (match any):
|
||||||
|
* traefik.localhost
|
||||||
|
* traefik.potato.kinf.wiai.uni-bamberg.de
|
||||||
|
* Adjust port mapping
|
||||||
|
* Default:
|
||||||
|
* 80 → 80
|
||||||
|
* Syntax: <host-port>:<container-port>
|
||||||
|
3. `docker-compose up -d`
|
||||||
|
4. `cd ../..`
|
||||||
|
5. `editor docker-compose.yml`
|
||||||
|
* adjust the *traefik.url.frontend.rule* labels for services *app* and *nginx*
|
||||||
|
* adjust the urls in *selector/config.py* accordingly
|
||||||
|
6. `docker-compose up -d`
|
||||||
|
7. You have a working analysis framework setup now
|
||||||
|
* Stop with `docker-compose down`
|
||||||
|
* Start with `docker-compose up -d`
|
||||||
|
|
||||||
|
## Usage (https)
|
||||||
|
|
||||||
|
1. Be on a host with port 80 available from the internet
|
||||||
|
2. Follw HTTP usage above up to step 2
|
||||||
|
3. Add acme.json volume:
|
||||||
|
* Uncomment the line for the acme.json volume
|
||||||
|
* Adjust the host path
|
||||||
|
* Syntax: <host-path>:<container-path>
|
||||||
|
4. Create acme.json
|
||||||
|
* touch acme.json
|
||||||
|
* chmod 600 acme.json
|
||||||
|
5. Activate traefiks ACME module
|
||||||
|
* `mv config.toml config_http.toml`
|
||||||
|
* `mv config_acme.toml config.toml`
|
||||||
|
* `editor config.toml`
|
||||||
|
* Adjust the *acme.email* value
|
||||||
|
6. Continue with HTTP Usage steps 3 +
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
logLevel = "INFO"
|
||||||
|
|
||||||
|
[web]
|
||||||
|
address = ":8080"
|
||||||
|
|
||||||
|
[docker]
|
||||||
|
watch = true
|
||||||
|
exposedbydefault = false
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
logLevel = "INFO"
|
||||||
|
defaultEntryPoints = ["https", "http"]
|
||||||
|
|
||||||
|
[web]
|
||||||
|
address = ":8080"
|
||||||
|
|
||||||
|
[docker]
|
||||||
|
watch = true
|
||||||
|
exposedbydefault = false
|
||||||
|
|
||||||
|
[entryPoints]
|
||||||
|
[entryPoints.http]
|
||||||
|
address = ":80"
|
||||||
|
[entryPoints.http.redirect]
|
||||||
|
entryPoint = "https"
|
||||||
|
[entryPoints.https]
|
||||||
|
address = ":443"
|
||||||
|
[entryPoints.https.tls]
|
||||||
|
|
||||||
|
[acme]
|
||||||
|
email = "tls-admin@org.example"
|
||||||
|
storage = "acme.json"
|
||||||
|
entryPoint = "https"
|
||||||
|
OnHostRule = true
|
||||||
|
[acme.httpChallenge]
|
||||||
|
entryPoint = "http"
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
traefik:
|
||||||
|
image: traefik:1.6
|
||||||
|
command: --configFile=/traefik.toml
|
||||||
|
volumes:
|
||||||
|
- ./config.toml:/traefik.toml
|
||||||
|
# - ./acme.json:/acme.json
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
networks:
|
||||||
|
- net
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.port=8080"
|
||||||
|
- "traefik.frontend.rule=Host:traefik.localhost,traefik.potato.kinf.wiai.uni-bamberg.de"
|
||||||
|
restart: on-failure:5
|
||||||
|
networks:
|
||||||
|
net:
|
||||||
|
driver: bridge
|
||||||
|
|
@ -10,7 +10,7 @@ from clients.webclients import Client, CLIENTS
|
||||||
from flask import Flask, render_template, request, redirect, session
|
from flask import Flask, render_template, request, redirect, session
|
||||||
|
|
||||||
from tasks import tasks
|
from tasks import tasks
|
||||||
from selector.temp_config import CONFIGS, URLS, HOSTS, RESULT_HOST
|
from selector.config import CONFIGS, URLS, HOSTS, RESULT_HOST
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
clients: typing.Dict[str, Client] = {}
|
clients: typing.Dict[str, Client] = {}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue