diff --git a/proxy/nginx/conf.d/miniflux.conf b/proxy/nginx/conf.d/miniflux.conf new file mode 100644 index 0000000..631d431 --- /dev/null +++ b/proxy/nginx/conf.d/miniflux.conf @@ -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; + } +} diff --git a/services/miniflux/docker-compose.yml b/services/miniflux/docker-compose.yml new file mode 100644 index 0000000..54412f7 --- /dev/null +++ b/services/miniflux/docker-compose.yml @@ -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