Chore/remove kong (#14)
* chore: remove kong * docs: traefik readme fix: leftover task
This commit is contained in:
parent
0db5e5663a
commit
4230fabf20
9 changed files with 21 additions and 86 deletions
|
@ -6,7 +6,7 @@
|
|||
|---|---|
|
||||
|[Plex](./plex)|Plex media server|
|
||||
|[Deluge](./deluge)|Deluge Web service|
|
||||
|[Kong](./kong)|Kong API Gateway|
|
||||
|[Traefik](./traefik)|Traefik API Gateway|
|
||||
|
||||
## Getting started
|
||||
|
||||
|
|
|
@ -25,5 +25,5 @@ services:
|
|||
- traefik.enable=true
|
||||
networks:
|
||||
default:
|
||||
name: kong-net
|
||||
name: web
|
||||
external: true
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
# Kong Service
|
||||
|
||||
API Gateway to Spadinaistan.
|
||||
|
||||
Hit `<host>:8000/<service>` to access services hosted on Spadinaistan!
|
|
@ -1,25 +0,0 @@
|
|||
version: '3.7'
|
||||
services:
|
||||
plex:
|
||||
image: kong:3.0.0
|
||||
restart: always
|
||||
container_name: kong-service
|
||||
environment:
|
||||
- KONG_DATABASE=off
|
||||
- KONG_DECLARATIVE_CONFIG=/kong/declarative/kong.yml
|
||||
- KONG_PROXY_ACCESS_LOG=/dev/stdout
|
||||
- KONG_ADMIN_ACCESS_LOG=/dev/stdout
|
||||
- KONG_PROXY_ERROR_LOG=/dev/stdout
|
||||
- KONG_ADMIN_ERROR_LOG=/dev/stdout
|
||||
- KONG_ADMIN_LISTEN=0.0.0.0:8001, 0.0.0.0:8444 ssl
|
||||
volumes:
|
||||
- $PWD:/kong/declarative
|
||||
ports:
|
||||
- 8000:8000
|
||||
- 8443:8443
|
||||
- 8001:8001
|
||||
- 8444:8444
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: kong-net
|
|
@ -1,21 +0,0 @@
|
|||
_format_version: "3.0"
|
||||
_transform: true
|
||||
|
||||
services:
|
||||
- host: 172.17.0.1
|
||||
name: deluge
|
||||
port: 8112
|
||||
protocol: http
|
||||
routes:
|
||||
- name: deluge
|
||||
paths:
|
||||
- /deluge/
|
||||
strip_path: true
|
||||
|
||||
plugins:
|
||||
- name: request-transformer
|
||||
route: deluge
|
||||
config:
|
||||
add:
|
||||
headers:
|
||||
- X-Deluge-Base:/deluge/
|
|
@ -1,29 +0,0 @@
|
|||
import invoke
|
||||
import pathlib
|
||||
|
||||
PATH = pathlib.Path(__file__).parent
|
||||
|
||||
|
||||
@invoke.task()
|
||||
def start(ctx):
|
||||
with ctx.cd(PATH):
|
||||
ctx.run("docker-compose up -d")
|
||||
|
||||
|
||||
@invoke.task()
|
||||
def stop(ctx):
|
||||
with ctx.cd(PATH):
|
||||
ctx.run("docker-compose down")
|
||||
|
||||
|
||||
@invoke.task()
|
||||
def restart(ctx):
|
||||
with ctx.cd(PATH):
|
||||
ctx.run("docker-compose restart")
|
||||
|
||||
|
||||
ns = invoke.Collection("kong")
|
||||
|
||||
ns.add_task(start)
|
||||
ns.add_task(restart)
|
||||
ns.add_task(stop)
|
5
tasks.py
5
tasks.py
|
@ -2,7 +2,7 @@ import invoke
|
|||
|
||||
import plex.tasks
|
||||
import deluge.tasks
|
||||
import kong.tasks
|
||||
import traefik.tasks
|
||||
|
||||
ns = invoke.Collection()
|
||||
|
||||
|
@ -25,6 +25,7 @@ server.add_task(system_updates, name="update")
|
|||
server.add_task(system_reboot, name="reboot")
|
||||
|
||||
ns.add_collection(plex.tasks.ns)
|
||||
|
||||
ns.add_collection(traefik.tasks.ns)
|
||||
ns.add_collection(deluge.tasks.ns)
|
||||
ns.add_collection(kong.tasks.ns)
|
||||
ns.add_collection(server)
|
||||
|
|
15
traefik/README.md
Normal file
15
traefik/README.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Traefik
|
||||
|
||||
[Traefik](https://traefik.io/) is a proxy / API Gateway.
|
||||
|
||||
## Setup
|
||||
|
||||
`inv traefik.start` will start the service.
|
||||
|
||||
When initializing for the first time, you should first `touch acme.json` and `chmod 600 acme.json` to ensure that the
|
||||
certificate can be created and accessed by Traefik properly.
|
||||
|
||||
## Adding services
|
||||
|
||||
Adding services is done via Docker Compose labels. Any service with the `traefik.enable` label will be picked up by the
|
||||
gateway.
|
|
@ -15,5 +15,4 @@ services:
|
|||
|
||||
networks:
|
||||
default:
|
||||
name: kong-net
|
||||
external: true
|
||||
name: web
|
||||
|
|
Reference in a new issue