name: touchbase services: postgres: image: postgres:16-alpine restart: unless-stopped environment: POSTGRES_USER: touchbase POSTGRES_PASSWORD: touchbase POSTGRES_DB: touchbase_dev ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data - ./db/init:/docker-entrypoint-initdb.d:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U touchbase -d touchbase_dev"] interval: 5s timeout: 5s retries: 10 mailpit: image: axllent/mailpit:latest restart: unless-stopped ports: - "1025:1025" # SMTP - "8025:8025" # web UI environment: MP_MAX_MESSAGES: "1000" MP_SMTP_AUTH_ACCEPT_ANY: "1" MP_SMTP_AUTH_ALLOW_INSECURE: "1" app: image: touchbase/app:dev profiles: [prod] build: context: . dockerfile: Dockerfile restart: unless-stopped depends_on: postgres: condition: service_healthy environment: NODE_ENV: production DATABASE_URL: postgresql://touchbase:touchbase@postgres:5432/touchbase_dev?schema=public APP_URL: ${APP_URL:-http://localhost:3000} expose: - "3000" caddy: image: caddy:2-alpine profiles: [prod] restart: unless-stopped depends_on: - app ports: - "80:80" - "443:443" volumes: - ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro - caddy_data:/data - caddy_config:/config volumes: pgdata: caddy_data: caddy_config: