Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 840124cc authored by Nicolas Gelot's avatar Nicolas Gelot
Browse files

Remove traefik as docker service

Fix: #55
parent 7ed28a87
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -14,9 +14,8 @@ Spot was forked from searx: read [documentation](https://asciimoo.github.io/sear


## Architecture
## Architecture


7 services are used for production:
6 services are used for production:


* [traefik](https://docs.traefik.io/) as edge router to publish services.
* [filtron](https://github.com/asciimoo/filtron) as reverse HTTP proxy to filter requests by different rules.
* [filtron](https://github.com/asciimoo/filtron) as reverse HTTP proxy to filter requests by different rules.
* [morty](https://github.com/asciimoo/morty) as proxy to serve thumbnails.
* [morty](https://github.com/asciimoo/morty) as proxy to serve thumbnails.
* [nginx](https://www.nginx.com/) as http server to serve static files.
* [nginx](https://www.nginx.com/) as http server to serve static files.
@@ -27,8 +26,8 @@ Spot was forked from searx: read [documentation](https://asciimoo.github.io/sear


```mermaid
```mermaid
graph TD
graph TD
  A(traefik) --> |https://spot.ecloud.global| B(filtron)
  A(reverse proxy) --> |http://localhost:8088| B(filtron)
  A(traefik) --> |https://proxy.spot.ecloud.global| C(morty)
  A(reverse proxy) --> |https://localhost:8089| C(morty)
  C --> |image link| C
  C --> |image link| C
  B --> D(nginx)
  B --> D(nginx)
  D --> |static file| D
  D --> |static file| D
+0 −33
Original line number Original line Diff line number Diff line
@@ -45,12 +45,6 @@ services:
    labels:
    labels:
      - "traefik.enable=true"
      - "traefik.enable=true"
      - "traefik.http.routers.spot.rule=Host(`${SPOT_HOSTNAME}`)"
      - "traefik.http.routers.spot.rule=Host(`${SPOT_HOSTNAME}`)"
      - "traefik.http.routers.spot.entrypoints=websecure"
      - "traefik.http.routers.spot.tls.certresolver=spotchallenge"
      - "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
      - "traefik.http.routers.http-catchall.entrypoints=web"
      - "traefik.http.routers.http-catchall.middlewares=redirect-to-https@docker"
      - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"


  morty:
  morty:
    image: ${SPOT_MORTY_DOCKER_IMG}:${SPOT_MORTY_DOCKER_TAG}
    image: ${SPOT_MORTY_DOCKER_IMG}:${SPOT_MORTY_DOCKER_TAG}
@@ -61,35 +55,8 @@ services:
    labels:
    labels:
      - "traefik.enable=true"
      - "traefik.enable=true"
      - "traefik.http.routers.spot_proxy.rule=Host(`${SPOT_MORTY_HOSTNAME}`)"
      - "traefik.http.routers.spot_proxy.rule=Host(`${SPOT_MORTY_HOSTNAME}`)"
      - "traefik.http.routers.spot_proxy.entrypoints=websecure"
      - "traefik.http.routers.spot_proxy.tls.certresolver=spotchallenge"

  traefik:
    build:
      context: .
      dockerfile: traefik.Dockerfile
    logging: *default-logging
    restart: unless-stopped
    command:
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - "--certificatesresolvers.spotchallenge.acme.tlschallenge=true"
      - "--certificatesresolvers.spotchallenge.acme.email=contact@e.email"
      - "--certificatesresolvers.spotchallenge.acme.storage=/letsencrypt/acme.json"
      - "--providers.file.filename=/etc/traefik/config.yml"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "letsencrypt:/letsencrypt"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"


  tor:
  tor:
    image: osminogin/tor-simple
    image: osminogin/tor-simple
    logging: *default-logging
    logging: *default-logging
    restart: unless-stopped
    restart: unless-stopped

volumes:
  letsencrypt:

etc/traefik/config.yml

deleted100644 → 0
+0 −8
Original line number Original line Diff line number Diff line
tls:
  options:
    default:
      minVersion: VersionTLS12
      cipherSuites:
        - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
        - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
        - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305

traefik.Dockerfile

deleted100644 → 0
+0 −3
Original line number Original line Diff line number Diff line
FROM traefik:v2.1.3

COPY etc/traefik/config.yml /etc/traefik/config.yml