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:
@@ -0,0 +1,34 @@
|
||||
# Deploy descriptor for the 15-puzzle container on the host Docker daemon.
|
||||
# Driven by .gitea/workflows/ci.yaml (`docker compose up -d --build`); env
|
||||
# values are interpolated from Gitea Actions secrets/variables exported by the
|
||||
# deploy job. Joins the external `edge` network so the host reverse proxy can
|
||||
# route to `15-puzzle:8080`.
|
||||
name: 15-puzzle
|
||||
|
||||
services:
|
||||
app:
|
||||
container_name: 15-puzzle
|
||||
image: 15-puzzle:latest
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
BOT_TOKEN: ${BOT_TOKEN:?set BOT_TOKEN}
|
||||
ACCESS_CODE: ${ACCESS_CODE:?set ACCESS_CODE}
|
||||
PROJECT_LINK: ${PROJECT_LINK:?set PROJECT_LINK}
|
||||
DATA_FILE: ${DATA_FILE:-/data/data.json}
|
||||
SERVER_PORT: ${SERVER_PORT:-8080}
|
||||
CONTEXT_ROOT: ${CONTEXT_ROOT:-/}
|
||||
volumes:
|
||||
- data:/data
|
||||
networks:
|
||||
- edge
|
||||
|
||||
volumes:
|
||||
data:
|
||||
name: 15-puzzle-data
|
||||
|
||||
networks:
|
||||
edge:
|
||||
external: true
|
||||
Reference in New Issue
Block a user