mirror of
https://github.com/Chewbaccalakis/rfid-database.git
synced 2026-09-09 16:01:56 -07:00
Add a Docker workflow that builds on PRs and pushes to ghcr.io/chewbaccalakis/rfid-database on main (latest + sha) and v* tags. Drop the redundant docker-build job from CI. Co-authored-by: Cursor Agent <[email protected]>
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
services:
|
|
rfid-database:
|
|
# Local build (default):
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: rfid-database:local
|
|
# Or pull from GHCR instead of building:
|
|
# image: ghcr.io/chewbaccalakis/rfid-database:latest
|
|
# pull_policy: always
|
|
container_name: rfid-database
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${RFID_PORT:-3000}:3000"
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
NODE_ENV: production
|
|
RFID_DB_PATH: /data/rfid.db
|
|
PORT: "3000"
|
|
HOSTNAME: 0.0.0.0
|
|
AUTH_TRUST_HOST: "true"
|
|
# OIDC: set AUTH_OIDC_ISSUER / CLIENT_ID / CLIENT_SECRET (and AUTH_URL)
|
|
# in .env — the login page picks them up at runtime.
|
|
# Optional bootstrap (only creates if missing):
|
|
# CREATE_USER_EMAIL: [email protected]
|
|
# CREATE_USER_PASSWORD: change-me
|
|
# CREATE_USER_NAME: Admin
|
|
volumes:
|
|
- rfid-data:/data
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:3000/login"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 25s
|
|
|
|
volumes:
|
|
rfid-data:
|