feat(deploy): Docker + Linux server deployment
Multi-stage Dockerfile (builder → export → runtime) producing a 149 MB Ubuntu 24.04 image, verified booting end-to-end on Docker Desktop. vcpkg fetched via shallow git fetch at the pinned baseline, release-only overlay triplets (x64-linux, arm64-linux) to halve intermediate disk usage, and buildtrees deleted within the RUN layer so they never land in the image or the BuildKit cache. Binary cache mount (VCPKG_BINARY_SOURCES) makes subsequent rebuilds restore pre-built packages instead of recompiling. Also adds: - docker-compose.yml for one-command local deploy - .dockerignore (excludes clients/, build/, .git/) - .github/workflows/build-linux.yml — CI cross-build for amd64 + arm64 with downloadable artifacts (primary path for building from Windows) - scripts/build-linux-binaries.sh — local Docker binary extraction fallback - deploy/linux/voicecat.service — hardened systemd unit for bare-metal - cmake/voicecat-toolchain.cmake now auto-wires VCPKG_OVERLAY_TRIPLETS Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
7
cmake/vcpkg-overlays/triplets/arm64-linux.cmake
Normal file
7
cmake/vcpkg-overlays/triplets/arm64-linux.cmake
Normal file
@@ -0,0 +1,7 @@
|
||||
set(VCPKG_TARGET_ARCHITECTURE arm64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
|
||||
# Only build release configurations — halves buildtree disk usage.
|
||||
# The server always ships a Release build; debug deps are never needed.
|
||||
set(VCPKG_BUILD_TYPE release)
|
||||
7
cmake/vcpkg-overlays/triplets/x64-linux.cmake
Normal file
7
cmake/vcpkg-overlays/triplets/x64-linux.cmake
Normal file
@@ -0,0 +1,7 @@
|
||||
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
|
||||
# Only build release configurations — halves buildtree disk usage.
|
||||
# The server always ships a Release build; debug deps are never needed.
|
||||
set(VCPKG_BUILD_TYPE release)
|
||||
@@ -68,5 +68,15 @@ if(NOT DEFINED VCPKG_TARGET_TRIPLET)
|
||||
unset(_voicecat_target)
|
||||
endif()
|
||||
|
||||
# ── Overlay triplets — project-local overrides take precedence ────────────────
|
||||
# Enables custom triplets (e.g. release-only x64-linux/arm64-linux, iOS slices)
|
||||
# without needing to fork vcpkg's built-in ones. Cross-compile presets that
|
||||
# already set VCPKG_OVERLAY_TRIPLETS explicitly (apple-ios, apple-ios-sim) keep
|
||||
# their own value via the DEFINED guard.
|
||||
if(NOT DEFINED VCPKG_OVERLAY_TRIPLETS)
|
||||
set(VCPKG_OVERLAY_TRIPLETS "${CMAKE_CURRENT_LIST_DIR}/vcpkg-overlays/triplets"
|
||||
CACHE STRING "vcpkg overlay triplets directory")
|
||||
endif()
|
||||
|
||||
# ── Hand off to the real vcpkg toolchain ──────────────────────────────────────
|
||||
include("$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
|
||||
|
||||
Reference in New Issue
Block a user