feat (service): setup wallabag config

This commit is contained in:
thomasabishop 2025-03-30 14:20:41 +01:00
parent f9df0fede0
commit 58e528b78b
2 changed files with 83 additions and 0 deletions

View file

@ -0,0 +1,33 @@
# HTTP configuration
# -- Redirect all HTTP requests to HTTPS port
server {
listen 80; # HTTP port
server_name wallabag.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 wallabag.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://wallabag:80;
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,50 @@
services:
wallabag:
image: wallabag/wallabag:latest
container_name: wallabag
restart: unless-stopped
volumes:
- wallabag_images:/var/www/wallabag/web/assets/images
- wallabag_data:/var/www/wallabag/data
ports:
- "8001:80"
networks:
- default
- web
depends_on:
- db
environment:
- SYMFONY__ENV__DATABASE_PASSWORD=${WALLABAG_CLIENT_PASSWORD} # wallabag client connection to DB
- SYMFONY__ENV__FROM_EMAIL=${WALLABAG_CLIENT_EMAIL} # not a login email
- SYMFONY__ENV__DOMAIN_NAME=https://wallabag.systemsobscure.net
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
- SYMFONY__ENV__DATABASE_HOST=db
- SYMFONY__ENV__DATABASE_PORT=3306
- SYMFONY__ENV__DATABASE_NAME=wallabag
- SYMFONY__ENV__DATABASE_USER=wallabag
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
- SYMFONY__ENV__SERVER_NAME="Your Wallabag Instance"
- SYMFONY__ENV__FOSUSER_REGISTRATION=false
- SYMFONY__ENV__FOSUSER_CONFIRMATION=false
db:
image: mariadb:10.5
container_name: wallabag_db
environment:
- MYSQL_ROOT_PASSWORD=${WALLABAG_DB_ROOT_PASSWORD}
- MYSQL_DATABASE=wallabag
- MYSQL_USER=wallabag
- MYSQL_PASSWORD=${WALLABAG_DB_USER_PASSWORD}
volumes:
- wallabag_db:/var/lib/mysql
restart: unless-stopped
volumes:
wallabag_data:
wallabag_images:
wallabag_db:
networks:
default:
web:
external: true