Files
ccn/Services/Website/Package.swift
T
javier 08b210e7c6 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>
2026-06-27 02:26:33 +00:00

75 lines
1.8 KiB
Swift

// swift-tools-version:6.3
import PackageDescription
let package = Package(
name: "Website",
platforms: [
.macOS(.v15),
.iOS(.v18),
.tvOS(.v18),
],
products: [
.executable(
name: "Website",
targets: [
"Website",
"WebsiteCore",
]
)
],
dependencies: [
.package(
url: "https://github.com/hummingbird-project/hummingbird.git",
from: "2.25.0"
),
.package(
url: "https://github.com/apple/swift-configuration.git",
from: "1.0.0",
traits: [
.defaults,
"CommandLineArguments",
]
),
],
targets: [
.executableTarget(
name: "Website",
dependencies: [
.product(
name: "Configuration",
package: "swift-configuration"
),
.product(
name: "Hummingbird",
package: "hummingbird"
),
],
path: "Sources/App"
),
.target(
name: "WebsiteCore",
dependencies: [],
path: "Sources/Library"
),
.testTarget(
name: "WebsiteTests",
dependencies: [
.product(
name: "HummingbirdTesting",
package: "hummingbird"
),
.byName(name: "Website"),
],
path: "Tests/App"
),
.testTarget(
name: "WebsiteCoreTests",
dependencies: [
.byName(name: "WebsiteCore"),
],
path: "Tests/Library"
),
]
)