Files
tukutoi/README.md
T

40 lines
3.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# TukuToi
Astro website served by nginx, with PHP-FPM contact and review forms delivered through Postmark.
## Deployment layout
- **Compose:** `/srv/docker/tukutoi/docker-compose.yml`
- **Static configuration/source:** this directory holds deployment configuration only; private application source, Dockerfile, and nginx/PHP configuration come from `ssh://git@git.yoonect.com:2222/TukuToi/TukuToi-LLC-Website.git`, branch `main`, with Dockerfile targets `web` and `php`
- **Non-secret environment:** application defaults are in private source; no project-local environment file is required
- **Secrets:** `/srv/docker/secrets/tukutoi/forms.env`; private Git builds use the operator's forwarded SSH agent
- **NVMe application state:** none declared
- **Bulk HDD data:** none used by the new application
- **Other mounts:** none
Secrets are never committed to this repository. The central secret environment is supplied only to the `php` service. Required settings are `FORM_SECRET`, `POSTMARK_TOKEN`, `MAIL_FROM`, and `MAIL_TO`; optional settings include `PUBLIC_EMAIL`, `SITE_URL`, `POSTMARK_STREAM`, and the four `TEMPLATE_*` aliases documented in application source. SSH credentials are available to the builder, not mounted into runtime containers.
## Dependencies and recovery
- **Networks/dependencies:** web and PHP share the default project bridge; web also joins external `npm_proxy` at `192.168.99.18`, serving HTTP port 80 without host-published ports. PHP needs outbound Postmark access. Building requires authenticated Git access, base-image and npm downloads; optional ECB rates retrieval falls back to committed data. The four Postmark templates must exist.
- **Back up:** deployment configuration, private application repository, central form environment, and external Postmark template configuration. The legacy WordPress backup was transferred to the owner’s Mac as `tukutoi-backup-WwP4kF8R`, with all seven manifest checksums verified. Preserve that Mac copy for later restoration. The redundant `/data/Data1/tukutoi-backup-WwP4kF8R` copy was deleted, with exact-path absence verified on 2026-10-29; the backup is independent of new-site runtime storage.
- **Re-creatable:** both images and containers; APCu rate-limit state is transient. Build both targets from deployable `main`, record its resolved commit and resulting image IDs for each release, then recreate containers. Retain previous images for rollback; rebuilding moving `main` does not reproduce a previous release. Validate pages, redirects, and both forms, including all expected Postmark emails.
Deployment and application acceptance were owner-confirmed on 2026-10-29. The private application README remains separate and unchanged by the host deployment documentation. The old WordPress files and temporary source checkout are retirement items, not dependencies of the new application.
## Building on Nautilus
The successful build used host networking for build steps and SSH-agent forwarding. Runtime containers retain their bridge networks. The private Dockerfile's Node build stage sets `NODE_OPTIONS="--dns-result-order=ipv4first --no-network-family-autoselection"` before `npm ci`. Owner testing showed the default Node connection failed while forced IPv4 and npm with these options downloaded the same package successfully. Host networking alone did not resolve the failure; its independent necessity has not been established.
With the operator's SSH agent loaded, run:
```bash
cd /srv/docker/tukutoi
sudo env SSH_AUTH_SOCK="$SSH_AUTH_SOCK" docker buildx bake \
-f docker-compose.yml --allow=network.host --allow=ssh \
--set web.tags=tukutoi-web --set php.tags=tukutoi-php \
--pull --load web php
```
The remote `main` must contain source changes before rebuilding. The temporary local review checkout is not the build context. Never publish build authentication or runtime secrets with this deployment repository.