All Projects → RealOrangeOne → traefik-pages

RealOrangeOne / traefik-pages

Licence: BSD-3-Clause license
Website hosting server designed to deeply integrate with Traefik

Programming Languages

rust
11053 projects
Dockerfile
14818 projects
HTML
75241 projects

Projects that are alternatives of or similar to traefik-pages

jasper2
Full-featured Jekyll port of Ghost's default theme Casper v2 👻
Stars: ✭ 725 (+4431.25%)
Mutual labels:  github-pages, static-site
Awesome Static Hosting And Cms
A collection of awesome static hosting & CMS providers
Stars: ✭ 163 (+918.75%)
Mutual labels:  hosting, static-site
pehapkari.cz-old
Website of Czech and Slovak PHP Community
Stars: ✭ 31 (+93.75%)
Mutual labels:  github-pages, static-site
Ghpages
Deploy arbitrary static assets through GitHub Actions
Stars: ✭ 169 (+956.25%)
Mutual labels:  github-pages, static-site
nextjs-github-pages
🚀 Deploy a Next.js app to Github Pages via Github Actions.
Stars: ✭ 89 (+456.25%)
Mutual labels:  github-pages, static-site
site
🏁📑 Static site generator for landing pages, docs, and more
Stars: ✭ 31 (+93.75%)
Mutual labels:  static-site
wakemeops
A Debian repository for portable applications
Stars: ✭ 54 (+237.5%)
Mutual labels:  hosting
assemble-core
The core assemble application with no presets or defaults. All configuration is left to the implementor.
Stars: ✭ 17 (+6.25%)
Mutual labels:  static-site
htransformation
A Traefik plugin to change on the fly header's value of a request
Stars: ✭ 44 (+175%)
Mutual labels:  traefik
helm-github-pages
Publish your Kubernetes Helm Charts on GitHub Pages. DEPRECATED: please use https://github.com/helm/chart-releaser
Stars: ✭ 22 (+37.5%)
Mutual labels:  github-pages
geniuss-place
GNSS-SDR Website
Stars: ✭ 16 (+0%)
Mutual labels:  github-pages
imfunniee.github.io
👨‍💻 personal portfolio website and projects
Stars: ✭ 50 (+212.5%)
Mutual labels:  github-pages
traefik-private-plugins
Automatic patch for Traefik supporting private plugins
Stars: ✭ 21 (+31.25%)
Mutual labels:  traefik
IEEEMAITSongs
Songs Lyrics Fetcher using Python on Frontend via Brython 🔥
Stars: ✭ 23 (+43.75%)
Mutual labels:  github-pages
taman
Pelican theme with "just the right amount"
Stars: ✭ 14 (-12.5%)
Mutual labels:  static-site
vue-bangalore
VueBLR Meetup Resources, Requests & Proposals
Stars: ✭ 37 (+131.25%)
Mutual labels:  static-site
simple-dev-blog-zola-starter
A simple dev-blog theme for Zola.
Stars: ✭ 30 (+87.5%)
Mutual labels:  static-site
bro-start
🚗💨 Blazing fast webpack setup for static websites
Stars: ✭ 12 (-25%)
Mutual labels:  static-site
NextCommunity.github.io
Join FREE: Community of open-source programmers and software engineers.
Stars: ✭ 29 (+81.25%)
Mutual labels:  github-pages
static-web-apps-gallery-code-samples
A community showcase of projects built with Azure Static Web Apps 🎉 Visit: https://microsoft.github.io/static-web-apps-gallery-code-samples/
Stars: ✭ 96 (+500%)
Mutual labels:  static-site

traefik-pages

CI

Website hosting server (think GitHub Pages) designed to deeply integrate with Traefik for routing and TLS termination.

Work in progress

Usage

Create a directory of directories, where the name of each directory is the hostname of a site you want to serve, with its content inside.

/mnt/sites
├── example.com
│   └── index.html
└── othersite.example.com
    └── index.html

How the files get there is up to you. Minio, rsync, webdav, ansible, doesn't matter.

How it works

traefik-pages integrates with Traefik via the HTTP provider. When Traefik hits the API, traefik-pages lists the directories containing sites to get the hostnames required, and returns a configuration of routers for Traefik to use. These routers have rules matching the hostnames from the directories, and services matching the one specified for traefik-pages. Traefik constantly polls traefik-pages for an updated configuration, so newly created sites wll be quickly picked up on.

Installation

First, create a container for traefik-pages:

  traefik-pages:
    image: theorangeone/traefik-pages:latest
    volumes:
      - ./sites:/mnt/sites:ro
    environment:
      - SITES_ROOT=/mnt/sites
      - TRAEFIK_SERVICE=traefik-pages@docker
      - AUTH_PASSWORD=hunter2
    labels:
      - traefik.enable=true

This doesn't need to be in the same file as Traefik, but it does need to be accessible to Traefik using a fixed hostname and IP. If Traefik is running in host mode (as I do), you'll need to bind traefik-pages to an internal interface, and listen to that.

The label enables traefik autoconfiguration to detect traefik-pages. Note that $TRAEFIK_SERVICE must match the service name created by traefik.

Next, you'll need to create a HTTP provider for Traefik, using the ports and password previously configured.

providers:
  ...
  http:
    endpoint:
      - "http://[email protected]:5000/.traefik-pages/provider"

Here you can also configure the polling interval for traefik-pages.

Now, simply start Traefik and traefik-pages, and they should begin communicating and creating routers for your sites.

Configuration

Configuration for traefik-pages is done entirely through environment variables:

  • $SITES_ROOT: Directory where sites are stored (required).

  • $TRAEFIK_SERVICE: Service name for traefik-pages, where traffic will be routed (required).

  • $AUTH_PASSWORD: Basic auth username required for access to private URLs (/.traefik-pages/*) (required).

  • $DENY_PREFIXES: Comma-separated list of URL prefixes to ignore (immediately return 404). Empty by default.

  • $LOG_INTERNAL: Whether to log requests for internal URLs (default false).

  • $TRAEFIK_CERT_RESOLVER: Traefik certificate resolver to use to provision TLS certificates (by default no certificates will be requested).

  • $PORT: Port to listen on (default 5000).

  • $WORKERS: Number of worker processes to handle requests (default 1).

Performance

traefik-pages is written in Rust, and designed to be as fast as possible.

Requests per second:    6786.85 [#/sec] (mean)
Time per request:       14.734 [ms] (mean)
Time per request:       0.147 [ms] (mean, across all concurrent requests)
Transfer rate:          1471.37 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       2
Processing:     3   15   5.5     14      51
Waiting:        2   14   5.5     14      51
Total:          3   15   5.5     14      51

Percentage of the requests served within a certain time (ms)
  50%     14
  66%     16
  75%     17
  80%     18
  90%     21
  95%     25
  98%     30
  99%     35
 100%     51 (longest request)

These tests were run on a 2600X, with a single worker process.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].