Skip to content

Dockerized deployment - #2809

Open
insanerask77 wants to merge 2 commits into
simple-login:masterfrom
insanerask77:dockerized-deployment
Open

insanerask77 wants to merge 2 commits into
simple-login:masterfrom
insanerask77:dockerized-deployment

Conversation

@insanerask77

Copy link
Copy Markdown

No description provided.

rafaelmadolell-a11y and others added 2 commits September 10, 2026 12:50
.docker/selfhosted/ — Docker Compose deployment for a real server: core
stack (db, app, email handler, job runner, Postfix, cron) plus a guided
installer (install.sh) that generates keys/DKIM, configures DNS (Cloudflare
API or manual + dig verification), opens firewall ports, tests outbound :25,
builds, migrates and verifies. manage.sh covers day-to-day ops (logs, verify,
upgrade, backup/restore, activate, make-premium, disable-registration).

Three reverse-proxy / TLS modes selected via DEPLOY_MODE:
  - simple : no proxy, webapp on 127.0.0.1:7777 (bring your own)
  - caddy  : Caddy + automatic Let's Encrypt
  - traefik: Traefik v3 + automatic Let's Encrypt (file provider)
Switch with install.sh --mode X or manage.sh set-mode X.

.docker/demo/ — self-contained local demo, no domain/DNS needed: Traefik +
*.traefik.me for local HTTPS, Mailpit to capture all outbound mail, Postfix
relaying everything to Mailpit. ./demo.sh send-test <alias> injects a message
so you can watch alias forwarding work end to end.

.dockerignore: exclude .docker/ so the app build context (repo root) does not
try to read the root-owned Postgres data dirs.

docs/troubleshooting.md: new section C on activating an account when the
confirmation email can't be delivered (fake/local address, mail not flowing).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K7DsA97C48NufwRRvdTnzr
.docker/selfhosted/uninstall.sh:
  - default: stop and remove containers + network, keep data/, images and config
  - --purge: also remove data/ (DB, PGP, DKIM, uploads), generated config,
    the simplelogin-selfhosted* images and the named volumes
  - offers (prompted) a pre-purge backup via manage.sh, closing the firewall
    ports install.sh opened (never SSH/22), and deleting the Cloudflare DNS
    records when CF_API_TOKEN is set
  - falls back to label-based `docker rm` when .env is already gone
  - never touches backups/ or the PTR record

lib/ports.sh: add close_firewall(). lib/dns.sh: add cf_delete() / cloudflare_remove().

demo: `./demo.sh destroy` now also removes its images and accepts `uninstall`
as an alias. The demo builds its own simplelogin-demo{,-postfix}:local images
(was sharing simplelogin-selfhosted:local) so uninstall --purge on the real
deployment can't break a running demo.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K7DsA97C48NufwRRvdTnzr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants