Add Gitea Actions CI/CD and deploy descriptor
- .gitea/workflows/ci.yaml: test on PR/push to master, deploy on push to master - deploy/docker-compose.yml: 15-puzzle container on the edge network with a persistent data volume - Dockerfile: create /data owned by app for the DATA_FILE volume - README: document deployment, required Actions secrets/variables, and persistence
This commit is contained in:
@@ -40,6 +40,12 @@ RUN apk add --no-cache tzdata ; \
|
||||
getent group ${GID} || addgroup --gid ${GID} ${TARGET_GROUP} ; \
|
||||
adduser -u ${UID} -g ${TARGET_GROUP} -D -S -h ${APPLICATION_HOME} ${TARGET_USER}
|
||||
WORKDIR ${APPLICATION_HOME}
|
||||
|
||||
# Persisted game-data directory (DATA_FILE lives here). A named volume mounted
|
||||
# at /data inherits this ownership on first use, so the unprivileged app user
|
||||
# can write the temp-file + rename that repo.go performs.
|
||||
RUN mkdir -p /data && chown ${TARGET_USER}:${TARGET_GROUP} /data
|
||||
|
||||
USER ${TARGET_USER}
|
||||
|
||||
COPY --from=builder /tmp/bin/server /usr/bin/server
|
||||
|
||||
Reference in New Issue
Block a user