Docker Deployment
ScanPick ships with a Docker Compose configuration for easy deployment. The stack includes PostgreSQL 16, the ScanPick API, and an nginx reverse proxy.
Quick Start
Section titled “Quick Start”git clone https://github.com/timDeHof/scanpick.gitcd scanpickcp .env.example .env# Edit .env with your secretsdocker compose up --buildOpen http://localhost and log in with worker-001 / 1234.
Production Deployment
Section titled “Production Deployment”For production, copy the docker-compose.yml to your server and customize:
services: postgres: image: postgres:16 environment: POSTGRES_DB: scanpick POSTGRES_USER: scanpick POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} volumes: - /data/scanpick/pgdata:/var/lib/postgresql/data restart: always
api: build: context: . dockerfile: src/ScanPick.Api/Dockerfile environment: DATABASE_CONNECTION_STRING: "Host=postgres;Database=scanpick;Username=scanpick;Password=${POSTGRES_PASSWORD}" JWT_SECRET: ${JWT_SECRET} ASPNETCORE_ENVIRONMENT: Production depends_on: - postgres restart: always
nginx: image: nginx:alpine ports: - "80:80" - "443:443" volumes: - ./nginx.conf:/etc/nginx/nginx.conf - /etc/ssl:/etc/ssl depends_on: - api restart: alwaysEnvironment File
Section titled “Environment File”POSTGRES_PASSWORD=your-secure-passwordJWT_SECRET=your-64-char-jwt-secretData Persistence
Section titled “Data Persistence”PostgreSQL data is stored in a Docker volume. To back up:
docker compose exec postgres pg_dump -U scanpick scanpick > backup.sqlTo restore:
cat backup.sql | docker compose exec -T postgres psql -U scanpick scanpickUpdating
Section titled “Updating”git pulldocker compose up --build -dThe API applies database migrations automatically on startup.