Files
15-puzzle/deploy/docker-compose.yml
T
Ilia Denisov 0e3e3b6c90
CI / test (pull_request) Successful in 1m20s
CI / deploy (pull_request) Has been skipped
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
2026-06-02 11:45:28 +02:00

35 lines
947 B
YAML

# 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