Selfhosting your own PaaS for free

Photo by Dominik Lückmann on Unsplash

Selfhosting your own PaaS for free

Docker Compose Setup for Porter PaaS

Florian Baader's photo
Florian Baader
·Apr 7, 2022·

1 min read

Nowadays hosting your software with Kubernetes is complex, painful and a long journey. However some tools make it a lot easier to deploy and manage software on k8s. One of those tools is porter.dev. Since the project is still on a very early stage, I find it very diffcult to host it yourself. Therefore I want to provide a quick guide for hosting the platform yourself.

The docker compose file

version: "2.3"
services:
  porter:
    image: porter1/porter:v0.21.0
    restart: always
    environment:
      SERVER_URL: "https://porter.YOURDOMAIN.com"
      DISABLE_ALLOWLIST: "true"
      ENCRYPTION_KEY: $PORTER_ENCRYPTION_KEY
      COOKIE_SECRETS: $PORTER_COOKIE_SECRETS
      WELCOME_FORM_WEBHOOK: "http://somerandomurl.com"
      REDIS_ENABLED: "false"
      GOOGLE_CLIENT_ID:
      GOOGLE_CLIENT_SECRET:
      GOOGLE_RESTRICTED_DOMAIN: YOURDOMAIN.com
      DB_HOST: postgres
      DB_PORT: 5432
      DB_USER: porter
      DB_PASS: $PORTER_DB_PASSWORD
    expose:
      - 8080
    labels:
      caddy: porter.YOURDOMAIN.com
      caddy.reverse_proxy: "{{upstreams 8080}}"

  postgres:
    image: postgres:14.1-alpine
    restart: always
    environment:
      - POSTGRES_USER=porter
      - POSTGRES_PASSWORD=$PORTER_DB_PASSWORD
      - POSTGRES_DB=porter
    expose:
      - 5432
    volumes:
      - $SERVICE_DATA_DIR/database:/var/lib/postgresql/data
 
Share this

Impressum