Skip to content

Instantly share code, notes, and snippets.

@ahxxm

ahxxm/docker-compose.yml Secret

Last active Oct 8, 2020
Embed
What would you like to do?
miniflux+caddy
version: '3'
services:
miniflux:
image: miniflux/miniflux:2.0.24
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
# 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

This comment has been minimized.

Copy link
Owner Author

@ahxxm 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

This comment has been minimized.

Copy link
Owner Author

@ahxxm 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
You can’t perform that action at this time.