Skip to content

Instantly share code, notes, and snippets.

@ahxxm
Last active April 26, 2021 08:19
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ahxxm/7ab3f3d49ec63f57f8fc12d68d477d8c to your computer and use it in GitHub Desktop.
miniflux+caddy
version: '3'
services:
miniflux:
image: miniflux/miniflux:2.0.29
container_name: rss
depends_on:
- db
environment:
- LISTEN_ADDR=0.0.0.0:8080
# your base url here
# - BASE_URL=https://somewhere.ahxxm.com
- RUN_MIGRATIONS=1
- LOG_DATE_TIME=1
# minutes, ref: https://miniflux.app/docs/configuration.html
- POLLING_FREQUENCY=15
- DATABASE_URL=postgres://miniflux:secret@db/miniflux?sslmode=disable
db:
image: postgres:13-alpine
container_name: rss-db
environment:
- POSTGRES_USER=miniflux
- POSTGRES_PASSWORD=secret
volumes:
- ./miniflux-db:/var/lib/postgresql/data
proxy:
image: abiosoft/caddy:1.0.3
container_name: rss-web
restart: always
environment:
- ACME_AGREE=true
ports:
- "80:80"
- "1443:1443"
links:
- miniflux:miniflux
volumes:
- "./Caddyfile:/etc/Caddyfile"
- "./.caddy:/root/.caddy"
@ahxxm
Copy link
Author

ahxxm commented Aug 31, 2020

Caddyfile

https://somewhere.ahxxm.com:1443 {
  proxy / miniflux:8080 {
        header_upstream Host {host}
        header_upstream X-Real-IP {remote}
        header_upstream X-Forwarded-For {remote}
        header_upstream X-Forwarded-Proto {scheme}
  }
  gzip
  header / {
        Strict-Transport-Security "max-age=31536000;"
        X-XSS-Protection "1; mode=block"
        X-Content-Type-Options "nosniff"
        X-Frame-Options "DENY"
  }
  tls somewhere@ahxxm.com
}

@ahxxm
Copy link
Author

ahxxm commented Aug 31, 2020

db migration might require docker-compose up -d --remove-orphans several times

then create admin:

docker exec -it rss sh
/usr/bin/miniflux -create-admin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment