Skip to content
shouya edited this page Mar 8, 2024 · 2 revisions

Docker compose

version: "3.8"
services:
  rss-funnel:
    image: ghcr.io/shouya/rss-funnel:latest
    ports:
      - 4080:4080
    environment:
      RSS_FUNNEL_CONFIG: /funnel.yaml
      RSS_FUNNEL_BIND: 0.0.0.0:4080
    volumes:
      - ./funnel.yaml:/funnel.yaml

Kubernetes

Here's a snippet from my infra code in Kubernetes deployment. It automatically fetches the latest config from a gist.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: rss-funnel
spec:
  selector:
    matchLabels:
      app: rss-funnel
  template:
    metadata:
      labels:
        app: rss-funnel
    spec:
      initContainers:
        # download config from gist and save it to /config/config.yaml
        - name: fetch-latest-config
          image: alpine
          command: ["/bin/sh", "-c", "wget -O /config/config.yaml $RAW_GIST_URL"]
          volumeMounts:
            - name: config
              mountPath: /config
          envFrom:
            - secretRef:
                name: rss-funnel-secret

      containers:
        - name: rss-funnel
          image: ghcr.io/shouya/rss-funnel:<version>
          command:
            [
              "/rss-funnel",
              "-c",
              "/config/config.yaml",
              "server",
              "-b",
              "0.0.0.0:4080",
            ]
          ports:
            - containerPort: 4080
              name: http
          volumeMounts:
            - name: config
              mountPath: /config

      volumes:
        - name: config
          emptyDir: {}

How to find the RAW gist url:

  • If your private gist's url is: https://gist.github.com/<user>/<gist_id>
  • The raw content can be found at: https://gist.githubusercontent.com/<user>/<gist_id>/raw
Clone this wiki locally