From 3ad6b9493a9302d704df8cd6e5b5e9ac73c4fef4 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Sun, 15 Nov 2026 19:35:45 -0500 Subject: [PATCH] Compose files and .env.example catch up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The compose files' steps say where the first-run setup code is (it's asked for since 2026.11.5), that new accounts come from the admin, and who adds aircraft; the published image's release tags are mentioned. - docker-compose.yml passes APP_REVISION/APP_BUILT_AT to the build when set, so a locally built image shows its build on Admin → About. - .env.example lists the optional push notification keys, APP_LOCALE and APP_IMAGE, which the README documented but it didn't. Co-Authored-By: Claude Opus 5.5 --- .env.example | 8 ++++++++ docker-compose.image.yml | 7 ++++--- docker-compose.traefik.yml | 2 ++ docker-compose.yml | 14 +++++++++++--- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.env.example b/.env.example index 5cf78f1..66d8dae 100644 --- a/.env.example +++ b/.env.example @@ -64,6 +64,14 @@ FORCE_SSL=true # LOGBOOK_AI_MODEL=claude-opus-5-5 # LOGBOOK_AI_EFFORT=high +# --- Push notifications -------------------------------------------------- +# Optional: without them the app makes a pair once and keeps it in storage/vapid_keys.json. +# Changing the pair turns notifications off on every device until turned on again. +# VAPID_PUBLIC_KEY= +# VAPID_PRIVATE_KEY= # bin/rails runner 'k = WebPush.generate_key; puts k.public_key, k.private_key' + # --- Other --------------------------------------------------------------- +# APP_LOCALE=en # language, e.g. es for config/locales/es.yml # APP_REPOSITORY_URL= # source link on Admin → About (for a fork) +# APP_IMAGE= # Docker image named in the records package README (for a fork) # RAILS_LOG_LEVEL=info diff --git a/docker-compose.image.yml b/docker-compose.image.yml index 08470db..8835dda 100644 --- a/docker-compose.image.yml +++ b/docker-compose.image.yml @@ -1,13 +1,14 @@ # Run a published image, without cloning the source. # # 1. Put this file and a .env (copied from .env.example) in a folder. -# 2. The image below is the project's published one (tags: latest, or a -# commit such as :1412470). To build and publish your own instead: +# 2. The image below is the project's published one (tags: latest, a +# release such as :2026.11.6, or a commit such as :34879e7). To build and publish your own instead: # docker build -t your-registry/simple-aircraft-manager-rails:latest \ # --build-arg APP_REVISION=$(git rev-parse --short HEAD) --build-arg APP_BUILT_AT=$(date -u +%FT%TZ) . # docker push your-registry/simple-aircraft-manager-rails:latest # 3. docker compose -f docker-compose.image.yml up -d -# 4. Open http://:3000 and create the admin account. +# 4. Open http://:3000 and create the admin account, with the setup +# code from: docker compose -f docker-compose.image.yml logs web | grep "Setup code" # # Updating: docker compose -f docker-compose.image.yml pull && docker compose -f docker-compose.image.yml up -d # (database changes are applied when the container starts). Then: docker compose exec web bin/rails sam:doctor diff --git a/docker-compose.traefik.yml b/docker-compose.traefik.yml index 734bc14..1eceb15 100644 --- a/docker-compose.traefik.yml +++ b/docker-compose.traefik.yml @@ -4,6 +4,8 @@ # the names to your Traefik setup. In .env: APP_HOST=aircraft.example.com, FORCE_SSL=true. # # docker compose -f docker-compose.traefik.yml up -d +# Then open https://aircraft.example.com and create the admin account with the +# setup code from: docker compose -f docker-compose.traefik.yml logs web | grep "Setup code" # # Authentik: create the proxy provider and the unauthenticated URL list as in # docs/authentik.md, then uncomment the middleware lines below. Leave them out diff --git a/docker-compose.yml b/docker-compose.yml index d04a592..7eda7d4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,11 +3,19 @@ # docker-compose.image.yml; behind Traefik (and Authentik), docker-compose.traefik.yml. # # cp .env.example .env # set SECRET_KEY_BASE (bin/rails secret), APP_HOST, FORCE_SSL -# docker compose up -d --build -# open http://localhost:3000 → create the admin account +# APP_REVISION=$(git rev-parse --short HEAD) docker compose up -d --build # the build shows on Admin → About +# open http://localhost:3000 → create the admin account, with the setup code from: +# docker compose logs web | grep "Setup code" +# +# New accounts after that come from the admin (Admin → Users or Invitations). +# Only admins add aircraft unless Admin → Settings allows everyone. services: web: - build: . + build: + context: . + args: + APP_REVISION: ${APP_REVISION:-} + APP_BUILT_AT: ${APP_BUILT_AT:-} restart: unless-stopped ports: - "3000:80"