From 3e7f162d8506c008499cedf7742b74648415c270 Mon Sep 17 00:00:00 2001 From: thomasabishop Date: Mon, 31 Mar 2025 18:33:21 +0100 Subject: [PATCH] feat (service): add linkding config --- proxy/nginx/conf.d/linkding.conf | 32 ++++++++++++++++++++++++++++ services/linkding/docker-compose.yml | 23 ++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 proxy/nginx/conf.d/linkding.conf create mode 100644 services/linkding/docker-compose.yml diff --git a/proxy/nginx/conf.d/linkding.conf b/proxy/nginx/conf.d/linkding.conf new file mode 100644 index 0000000..7528e42 --- /dev/null +++ b/proxy/nginx/conf.d/linkding.conf @@ -0,0 +1,32 @@ +# HTTP configuration +# -- Redirect all HTTP requests to HTTPS port +server { + listen 80; # HTTP port + server_name bookmarks.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 bookmarks.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://linkding:9090; + 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/linkding/docker-compose.yml b/services/linkding/docker-compose.yml new file mode 100644 index 0000000..17d1d56 --- /dev/null +++ b/services/linkding/docker-compose.yml @@ -0,0 +1,23 @@ +services: + linkding: + image: sissbruecker/linkding:latest + container_name: linkding + ports: + - "8001:9090" + networks: + - web + volumes: + - data:/etc/linkding/data + environment: + - LD_DISABLE_BACKGROUND_TASKS=False + - LD_SUPERUSER_NAME=${LINKDING_USERNAME} + - LD_SUPERUSER_PASSWORD=${LINKDING_PASSWORD} + - LD_DISABLE_REGISTRATION=True + restart: unless-stopped + +volumes: + data: + +networks: + web: + external: true