Files
rickyandClaude Opus 5.5 5876c07a1a Harden installs reachable from the internet without a proxy
- Refuse to start with a placeholder or short SECRET_KEY_BASE (under 32
  characters); warn and fail sam:doctor under 64. .env.example no longer
  ships a placeholder.
- First-run setup needs a one-time code printed only in the server log, so
  only whoever runs the server can create the admin account.
- AirTrail: the server resolves the address and connects to exactly that;
  never the server itself or link-local addresses (cloud metadata);
  private-network addresses only for admins or hosts in
  AIRTRAIL_ALLOWED_HOSTS.
- Host authorization when APP_HOST is set: APP_HOST, the APP_URL host,
  ALLOWED_HOSTS, localhost and IP addresses; /up exempt. A blocked name
  gets a short explanation instead of a blank 403.
- docker-compose.direct.yml: HTTPS without a proxy via Thruster's built-in
  Let's Encrypt (TLS_DOMAIN).
- Notes' Markdown no longer allows the unused class attribute.
- README, .env.example and the user guide updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 12:42:53 -05:00

34 lines
1.3 KiB
YAML

# Directly on the internet, with HTTPS and no proxy in front: the image's web
# server (Thruster) gets and renews a Let's Encrypt certificate by itself.
#
# 1. Point a DNS name (A/AAAA record) at this server, and open ports 80 and
# 443 to it (80 is needed for the certificate check and redirects).
# 2. In .env: APP_HOST and TLS_DOMAIN set to that name, FORCE_SSL=true, and
# a SECRET_KEY_BASE from `bin/rails secret`.
# 3. docker compose -f docker-compose.direct.yml up -d
# 4. Open https://<name>, and create the admin account with the setup code
# from: docker compose -f docker-compose.direct.yml logs web | grep "Setup code"
#
# The certificate is kept in the storage volume, so it isn't requested again
# on every start.
services:
web:
image: barrettefab/simple-aircraft-manager-rails:latest # or your own image, or: build: .
restart: unless-stopped
ports:
- "80:80"
- "443:443"
env_file: .env
environment:
SOLID_QUEUE_IN_PUMA: "true" # nightly backup, reminders and AD search run in the web process
FORCE_SSL: "true"
volumes:
- sam_storage:/rails/storage # databases, uploaded files, nightly backups and the certificate: back this up
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost/up"]
interval: 30s
timeout: 5s
retries: 3
volumes:
sam_storage: