Website service target setup (#2)
This PR contains the work done to add and setup the *Website* service target, a **Hummingbird** server app, into the Xcode project as a SwiftPM package with full support for containerization and driven by a `Makefile` file. To provide further details about the work done: * Swift package — SwiftPM manifest with a Website executable, related library, and test targets; depends on **hummingbird** and **swift-configuration**. * Containerization — Multi-stage `Dockerfile` producing a static-linked release build with jemalloc, running as a non-root user on port 8080. Production and local-dev `docker-compose` files included. * Configuration — `.env.local` template (with `.env` git-ignored) and `.dockerignore`/`.gitignore` entries. * Makefile — Self-documenting operational commands: * pkg — SwiftPM: _build, release, test, clean, reset, deps, outdated, update_ * img — Docker lifecycle: _build, mount, unmount, release_ Notes * New service only — no changes to existing code; nothing else in the repo is affected. * App logic is currently scaffolding; this PR establishes the service structure, build, and deployment tooling. Reviewed-on: rock-n-code/loud-amsterdam#2 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# Copy this file to `.env` and adjust values as needed.
|
||||
# cp .env.example .env
|
||||
#
|
||||
# Compose reads `.env` automatically to fill the ${VAR} placeholders in
|
||||
# docker-compose.yml. The Website app ALSO reads a `.env` file at runtime via
|
||||
# swift-configuration (allowMissing: true), so any extra app config keys placed
|
||||
# here are picked up by the running service too.
|
||||
|
||||
# --- Image / deployment -------------------------------------------------------
|
||||
|
||||
# Host name of the container running the Website service.
|
||||
HOST_CONTAINER=containers.rock-n-code.com
|
||||
|
||||
# Owner of the container running the Website service.
|
||||
HOST_OWNER=loud
|
||||
|
||||
# Password for authenticating to the container registry.
|
||||
HOST_PASSWORD=
|
||||
|
||||
# Host port mapped to the container's port 8080.
|
||||
HOST_PORT=8080
|
||||
|
||||
# User name for authenticating to the container registry.
|
||||
HOST_USER=
|
||||
|
||||
# Name of the Docker image to pull/run.
|
||||
IMAGE_NAME=website
|
||||
|
||||
# Platform of the Docker image to pull/run.
|
||||
IMAGE_PLATFORM=linux/arm64
|
||||
|
||||
# Tag of the image to pull/run.
|
||||
# Use a semver in production; avoid `latest` so rollbacks are unambiguous.
|
||||
IMAGE_TAG=latest
|
||||
|
||||
# --- Application config -------------------------------------------------------
|
||||
|
||||
# Server name reported by the HTTP service.
|
||||
HTTP_SERVER_NAME=LoudWebsite
|
||||
|
||||
# Log verbosity: trace | debug | info | notice | warning | error | critical
|
||||
LOG_LEVEL=info
|
||||
Reference in New Issue
Block a user