feat (service): set up miniflux

This commit is contained in:
Thomas Bishop 2025-06-19 18:56:09 +01:00
parent eb0805bbd8
commit 2c26b724cb
2 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,32 @@
# HTTP configuration
# -- Redirect all HTTP requests to HTTPS port
server {
listen 80; # HTTP port
server_name miniflux.systemsobscure.net;
location / {
return 301 https://$host$request_uri; # Variable is a placeholder for all requests to the server name
}
}
# HTTPS configuration
server {
listen 443 ssl;
server_name miniflux.systemsobscure.net;
# SSL configuration
ssl_certificate /etc/letsencrypt/live/systemsobscure.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/systemsobscure.net/privkey.pem;
# Security headers
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
# Proxy Configuration
location / {
proxy_pass http://miniflux:8080; # Docker network address
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

View file

@ -0,0 +1,31 @@
services:
miniflux:
image: miniflux/miniflux:latest
container_name: miniflux
ports:
- "8005:8080"
depends_on:
db:
condition: service_healthy
environment:
- DATABASE_URL=${MINIFLUX_POSTGRES_DATABASE_URL}
- RUN_MIGRATIONS=1
- CREATE_ADMIN=1
- ADMIN_USERNAME=${MINIFLUX_ADMIN_USERNAME}
- ADMIN_PASSWORD=S{MINIFLUX_ADMIN_PASSWORD}
db:
image: postgres:17-alpine
environment:
- POSTGRES_USER=miniflux
- POSTGRES_PASSWORD=${MINIFLUX_POSTGRES_DATABASE_PASSWORD}
- POSTGRES_DB=miniflux
volumes:
- /data/postgres/miniflux:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "miniflux"]
interval: 10s
start_period: 30s
networks:
web:
external: true