1. home
  2. posts
  3. about
  4. rss

Hosting a static website with Minio

Table of Contents


minio-bucket-static-website-files.png

Figure 1: Static website files inside an s3 bucket

Introduction

Setting up minio inside a Docker container

Installing the minio client

Configuring the HTTP router

Traefik

# [LIVE] https://wsantos.io/
[http.routers.wsantos_io-blog_live]
  entrypoints = ["websecure"]
  rule = "Host(`wsantos.io`)"
  service = "s3_wsantos_net-api@docker"
  middlewares = ["wsantos_io-blog_live"]

  [http.routers.wsantos_io-blog_live.tls]
    certresolver = "letsencrypt"

[http.middlewares.wsantos_io-blog_live.replacePathRegex]
  regex = "^/(.*)"
  replacement = "/websites/wsantos.io/blog/live/$1"

# [STAGING] https://staging.wsantos.io/
[http.routers.wsantos_io-blog_staging]
  entrypoints = ["websecure"]
  rule = "Host(`staging.wsantos.io`)"
  service = "s3_wsantos_net-api@docker"
  middlewares = ["wsantos_io-blog_staging"]

  [http.routers.wsantos_io-blog_staging.tls]
    certresolver = "letsencrypt"

[http.middlewares.wsantos_io-blog_staging.replacePathRegex]
  regex = "^/(.*)"
  replacement = "/websites/wsantos.io/blog/staging/$1"
Last updated: Monday 19 February, 2024