feat: add Docker support and Gitea publish workflow
All checks were successful
Build and Publish Docker Image / deploy (push) Successful in 1m38s
All checks were successful
Build and Publish Docker Image / deploy (push) Successful in 1m38s
- Add a multi-stage Dockerfile for building and running the Go backend - Add .dockerignore to optimize the Docker build context - Create a Gitea Actions workflow to build and publish Docker images on tag push - Register a new `/health` endpoint for container healthchecks - Update README.md with Docker and Podman deployment instructions - Ignore local `docker-compose.yml` in .gitignore
This commit is contained in:
24
docker-compose.example.yml
Normal file
24
docker-compose.example.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
services:
|
||||
warpbox-dev:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: warpbox-dev:local
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
WARPBOX_ADDR: ":8080"
|
||||
WARPBOX_DATA_DIR: /data
|
||||
WARPBOX_STATIC_DIR: /app/static
|
||||
WARPBOX_TEMPLATE_DIR: /app/templates
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- ./data:/data:Z
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8080/health >/dev/null || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 3s
|
||||
start_period: 10s
|
||||
retries: 3
|
||||
Reference in New Issue
Block a user