Installation
PetHealth is a single container: the API and the web UI run together on port 3001 inside the container, and all data lives in /app/data.
Requirements
Section titled “Requirements”- Docker Engine 20+ (or Docker Desktop), plus Docker Compose v2 if you use Compose.
- About 200 MB of disk for the image, plus whatever your uploads take.
- The image is linux/amd64. For ARM, see Build from source.
Docker Compose (recommended)
Section titled “Docker Compose (recommended)”Create a folder and add two files.
docker-compose.yml
services: pethealth: image: martitoci/pethealth:latest container_name: pethealth restart: unless-stopped ports: - "3000:3001" volumes: - ./data:/app/data env_file: .env.env
echo "JWT_SECRET=$(openssl rand -hex 32)" > .envecho "TZ=America/New_York" >> .envThen start it:
docker compose up -ddocker compose logs -f # optional: watch the first startOn the first start the log shows lines like these (migrations, the default user, the demo pets):
🔄 Migración 5 aplicada⚠️ Usuario por defecto creado: admin / admin123 — se pedirá cambiarla al entrar🐾 Mascotas de demostración creadas: Milo, Luna, Copito, Rocky🚀 Backend corriendo en puerto 3001(Server logs are in Spanish.) See Environment variables for everything you can put in .env.
docker run
Section titled “docker run”docker run -d --name pethealth --restart unless-stopped \ -p 3000:3001 \ -e JWT_SECRET="$(openssl rand -hex 32)" \ -e TZ=America/New_York \ -v "$(pwd)/data:/app/data" \ martitoci/pethealth:latestAdd more -e NAME=value flags for other settings.
Build from source
Section titled “Build from source”Use this on ARM machines or if you want to change the code.
git clone https://github.com/chmedinap/pethealth.gitcd pethealthcp .env.example .env # then set JWT_SECRET (openssl rand -hex 32)docker compose up --build -dThe repository’s docker-compose.yml builds the image locally and passes every supported variable from .env.
Start empty instead of with demo data
Section titled “Start empty instead of with demo data”Set SEED_DEMO=false before the first start. Demo pets are only created when the database is new, so changing it later has no effect. Delete the demo pets from their profile instead.
Updating
Section titled “Updating”docker compose pulldocker compose up -dDatabase migrations run automatically on startup. Read the release notes before updating, and keep a backup of data/.
Uninstalling
Section titled “Uninstalling”docker compose down # stop and remove the containerrm -rf data # ⚠️ deletes all your pets' data