Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/stop-failed-install-recipes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ftw": patch
---

Keep private FTW data out of the release Docker build context. Install commands stop on download errors and refuse to overwrite an earlier Docker test. The English and Swedish guides put the physical SD-card swap before installation and treat Docker as a separate path.
2 changes: 1 addition & 1 deletion .github/scripts/classify-test-changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ while IFS= read -r file; do
web/*|package.json|package-lock.json)
web=true
;;
Dockerfile|Dockerfile.optimizer|docker-compose*.yml|scripts/enable-modular-stack.sh|scripts/migrate-legacy-compose.sh|scripts/upgrade-paired-release.sh|scripts/test-upgrade-paired-release.sh|scripts/test-modular-compose.sh|scripts/test-container-boundaries.sh|scripts/install-macos.sh|.github/scripts/classify-test-changes.sh|.github/scripts/test-change-classifier.sh)
deploy/docker/*|docs/native-beta.md|docs/setup-guide/update-sv.md|scripts/test_install_docs.py|scripts/test-release-docker-context.sh|Dockerfile|Dockerfile.optimizer|docker-compose*.yml|scripts/enable-modular-stack.sh|scripts/migrate-legacy-compose.sh|scripts/upgrade-paired-release.sh|scripts/test-upgrade-paired-release.sh|scripts/test-modular-compose.sh|scripts/test-container-boundaries.sh|scripts/install-macos.sh|.github/scripts/classify-test-changes.sh|.github/scripts/test-change-classifier.sh)
compose=true
;;
.github/workflows/beta.yml|.github/workflows/release.yml|.github/workflows/release-assets.yml|scripts/check-legacy-release-line.sh|scripts/check-stable-release.py|scripts/package-linux.py|scripts/test_package_linux.py|scripts/upload-release-assets.sh|scripts/test-upload-release-assets.sh|scripts/check-ghcr-write-access.sh|scripts/test-ghcr-write-access.sh|scripts/test-exact-image-promotion.sh|scripts/github-release-by-id.sh|scripts/test-github-release-by-id.sh|scripts/promote-paired-latest.sh|scripts/test-promote-paired-latest.sh)
Expand Down
5 changes: 5 additions & 0 deletions .github/scripts/test-change-classifier.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,9 @@ assert_paths 'scripts/upgrade-paired-release.sh' \
assert_paths 'scripts/test-upgrade-paired-release.sh' \
'core=false' 'optimizer=false' 'web=false' 'drivers=false' 'compose=true'

for path in deploy/docker/.dockerignore docs/native-beta.md docs/setup-guide/update-sv.md scripts/test_install_docs.py scripts/test-release-docker-context.sh; do
assert_paths "$path" \
'core=false' 'optimizer=false' 'web=false' 'drivers=false' 'compose=true'
done

echo "test workflow path classifier contract passed"
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ compose-migration-test:

container-boundary-test: release-workflow-test
bash scripts/test-container-boundaries.sh
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s scripts -p 'test_install_docs.py'
bash scripts/test-release-docker-context.sh

release-workflow-test:
bash scripts/test-install-native.sh
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,14 @@ The new line starts at `v0.131.0-beta.1`; old 0.x releases up to 0.130.x are
also retired. A lower version number or a saved `beta` channel does not tell
you which install path you have. Identify it before running commands.

Use a fresh 64-bit Raspberry Pi OS, Debian or Ubuntu host for native systemd,
or run the same release package in Docker on Linux. Existing sites can switch
using a second SD card/host or a separate Docker project with new data. The
**Old FTW on a Raspberry Pi? Use a second SD card.** Keep the old card,
prepare the new one and swap cards before running install commands. Follow
[the card-by-card steps](docs/native-beta.md#raspberry-pi-use-a-second-sd-card).
Do not try Docker next if the native installer refuses the old card.

Use a fresh 64-bit Raspberry Pi OS, Debian or Ubuntu host for native systemd.
Docker on the same Linux host is a separate, advanced option: identify and
stop old Core and its updater, and preserve any MQTT service first. The
guided migration of settings and history is not ready; preserve the old data
and get help if those data must move before you switch. Only one Core may
control the equipment, including after reboot.
Expand Down
3 changes: 3 additions & 0 deletions deploy/docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!Dockerfile
!.dockerignore
8 changes: 4 additions & 4 deletions deploy/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*

RUN set -eu; \
test -n "${FTW_VERSION}" || { echo "Set FTW_VERSION, for example v0.135.1-beta.1" >&2; exit 1; }; \
test -n "${FTW_VERSION}" || { echo "Set FTW_VERSION to an exact published new 0.x tag" >&2; exit 1; }; \
pkg="ftw-linux-$(dpkg --print-architecture).tar.gz"; \
url="https://github.com/srcfl/ftw/releases/download/${FTW_VERSION}"; \
cd /tmp; \
Expand All @@ -26,9 +26,9 @@ RUN set -eu; \
# `docker compose exec ftw ftw status` runs the same status, backup and
# support commands as a native install. Updates change FTW_VERSION instead.

# Numeric uid and gid 100:101, as in the 2.x image, so existing data
# directories keep working. HOME points into the data volume because no
# account exists.
# The new, separate data directory belongs to uid:gid 100:101. This does not
# make data from an older FTW compatible. HOME points into the data volume
# because no account exists.
ENV HOME=/app/data
USER 100:101
WORKDIR /app/data
Expand Down
18 changes: 6 additions & 12 deletions deploy/docker/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# FTW 0.x in Docker. Put this file, the Dockerfile beside it and a .env
# with FTW_VERSION in one directory, then see docs/native-beta.md:
#
# mkdir -p data && sudo chown 100:101 data
# echo FTW_VERSION=v0.X.Y-beta.N > .env # replace with an exact published tag
# docker compose up -d --build
#
# Update: change FTW_VERSION in .env and run `docker compose up -d --build`.
# Going back is the same with the previous version.
#
# The project has its own name so it never mixes with an older FTW stack,
# whose project is called ftw.
# FTW 0.x in Docker. Follow docs/native-beta.md#docker before starting.
# Keep compose.yaml, Dockerfile, .dockerignore and .env together. The ignore
# file keeps private data out of the build context, including on later builds.
# Use separate empty data; stop old Core and its updater before starting here.
# A separate project name does not prevent two Cores controlling one site.
# Update: change FTW_VERSION in .env and rebuild as the guide describes.
name: ftw-local

services:
Expand Down
Loading
Loading