server/deploy.sh: build here, back up, migrate, switch, verify
Production ran code from 31 August and answered 404 to most of the API the merchant and mobile clients are written against. The script builds the web app into a static linux binary on the developer machine (the host has 3.6 GB shared with other services and must not compile), backs the database up, runs the migrations with the new binary while the old server still serves so a failure stops with nothing changed, switches, and proves the routes over the public URL. API.md now names the API host correctly: mcp.loyaly.ai, not the console's platform.loyaly.ai. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGcjxF1cNLcuwc3DAPcnfj
This commit is contained in:
14
server/Dockerfile.runtime
Normal file
14
server/Dockerfile.runtime
Normal file
@@ -0,0 +1,14 @@
|
||||
# Runtime-only image, for a host that must not compile.
|
||||
#
|
||||
# The production box has 3.6 GB of RAM shared with other tenants' services;
|
||||
# `Dockerfile` pulls a Go toolchain and builds there, which is how deploys
|
||||
# became something nobody wanted to run. deploy.sh builds the static binary
|
||||
# on the developer's machine and ships only that. Same runtime layer as
|
||||
# Dockerfile, on purpose - the two must not drift.
|
||||
FROM alpine:3.20
|
||||
RUN apk add --no-cache ca-certificates tzdata && \
|
||||
adduser -D -u 10001 behavision
|
||||
COPY behavision-server /usr/local/bin/behavision-server
|
||||
USER behavision
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/usr/local/bin/behavision-server"]
|
||||
Reference in New Issue
Block a user