Extract receipt UI components, add view/edit/create dialog modes with list receipt previews, add docker-compose.coolify.yml and clearer COOLIFY/S3 path-style guidance for Application + MinIO setups. Co-authored-by: Cursor <cursoragent@cursor.com>
112 lines
4.1 KiB
YAML
112 lines
4.1 KiB
YAML
# Beevoice on Coolify — single Docker Compose resource (recommended).
|
|
#
|
|
# Deploy: Coolify → New Resource → Docker Compose → compose file: docker-compose.coolify.yml
|
|
#
|
|
# 1. Assign a domain to the `app` service in Coolify (SERVICE_FQDN_APP wires Traefik).
|
|
# 2. Set AUTH_SECRET, POSTGRES_PASSWORD, MINIO_ROOT_* in the resource env (see .env.example).
|
|
# 3. Do NOT override S3_ENDPOINT — this stack sets http://minio:9000 on the shared network.
|
|
# 4. Rebuild after changing NEXT_PUBLIC_* (image build args use SERVICE_URL_APP).
|
|
#
|
|
# Migrating from Application + separate Postgres + MinIO compose:
|
|
# - Export Postgres data, point DATABASE_URL at this stack's `db` service, redeploy once here.
|
|
# - Or keep external Postgres and remove the `db` service + volume from this file.
|
|
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
args:
|
|
NEXT_PUBLIC_APP_URL: ${SERVICE_URL_APP:-${NEXT_PUBLIC_APP_URL:-http://localhost:3000}}
|
|
BETTER_AUTH_URL: ${SERVICE_URL_APP:-${BETTER_AUTH_URL:-http://localhost:3000}}
|
|
image: ${BEENVOICE_IMAGE:-beenvoice:coolify}
|
|
environment:
|
|
SERVICE_FQDN_APP:
|
|
NODE_ENV: production
|
|
AUTH_SECRET: ${AUTH_SECRET:?Set AUTH_SECRET in Coolify env}
|
|
DATABASE_URL: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-postgres}
|
|
DB_DISABLE_SSL: "true"
|
|
BETTER_AUTH_URL: ${SERVICE_URL_APP:-${BETTER_AUTH_URL:-http://localhost:3000}}
|
|
NEXT_PUBLIC_APP_URL: ${SERVICE_URL_APP:-${NEXT_PUBLIC_APP_URL:-http://localhost:3000}}
|
|
RESEND_API_KEY: ${RESEND_API_KEY:-}
|
|
RESEND_DOMAIN: ${RESEND_DOMAIN:-}
|
|
NEXT_PUBLIC_UMAMI_WEBSITE_ID: ${NEXT_PUBLIC_UMAMI_WEBSITE_ID:-}
|
|
NEXT_PUBLIC_UMAMI_SCRIPT_URL: ${NEXT_PUBLIC_UMAMI_SCRIPT_URL:-https://analytics.umami.is/script.js}
|
|
NEXT_PUBLIC_AUTHENTIK_ENABLED: ${NEXT_PUBLIC_AUTHENTIK_ENABLED:-false}
|
|
DISABLE_SIGNUPS: ${DISABLE_SIGNUPS:-true}
|
|
AUTHENTIK_ISSUER: ${AUTHENTIK_ISSUER:-}
|
|
AUTHENTIK_CLIENT_ID: ${AUTHENTIK_CLIENT_ID:-}
|
|
AUTHENTIK_CLIENT_SECRET: ${AUTHENTIK_CLIENT_SECRET:-}
|
|
AUTHENTIK_ORIGIN: ${AUTHENTIK_ORIGIN:-}
|
|
S3_ENDPOINT: http://minio:9000
|
|
S3_BUCKET: ${S3_BUCKET:-beenvoice-receipts}
|
|
S3_ACCESS_KEY: ${MINIO_ROOT_USER:-minioadmin}
|
|
S3_SECRET_KEY: ${MINIO_ROOT_PASSWORD:-minioadmin}
|
|
S3_REGION: ${S3_REGION:-us-east-1}
|
|
expose:
|
|
- "3000"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
minio-init:
|
|
condition: service_completed_successfully
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: postgres:17-alpine
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
|
POSTGRES_DB: ${POSTGRES_DB:-postgres}
|
|
volumes:
|
|
- beenvoice_pg_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test:
|
|
["CMD-SHELL", 'pg_isready -U "$${POSTGRES_USER}" -d "$${POSTGRES_DB}"']
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
restart: unless-stopped
|
|
|
|
minio:
|
|
image: minio/minio:latest
|
|
# Optional: assign domains in Coolify for console / external S3 API access.
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin}
|
|
SERVICE_FQDN_MINIO_9001:
|
|
volumes:
|
|
- beenvoice_minio_data:/data
|
|
command: server /data --console-address ":9001"
|
|
expose:
|
|
- "9000"
|
|
- "9001"
|
|
healthcheck:
|
|
test: ["CMD", "mc", "ready", "local"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
restart: unless-stopped
|
|
|
|
minio-init:
|
|
image: minio/mc:latest
|
|
depends_on:
|
|
minio:
|
|
condition: service_healthy
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin}
|
|
S3_BUCKET: ${S3_BUCKET:-beenvoice-receipts}
|
|
entrypoint: ["/bin/sh", "-c"]
|
|
command:
|
|
- >-
|
|
mc alias set local http://minio:9000
|
|
"$${MINIO_ROOT_USER:-minioadmin}"
|
|
"$${MINIO_ROOT_PASSWORD:-minioadmin}" &&
|
|
mc mb "local/$${S3_BUCKET:-beenvoice-receipts}" --ignore-existing
|
|
restart: "no"
|
|
|
|
volumes:
|
|
beenvoice_pg_data:
|
|
beenvoice_minio_data:
|