# Example environment file for apparel-designer. # # Copy this to `.env` and adjust values as needed. Compose reads # `.env` automatically for variable substitution in docker-compose.yml # AND passes the values as runtime environment to the running # container, so a single file covers both build-time and runtime. # # ────────────────────────────────────────────────────────────────── # Runtime — values the server reads at startup # ────────────────────────────────────────────────────────────────── # HTTP port the Express server binds to. Matches the host-side port # in docker-compose.yml's `ports:` mapping. PORT=3001 # `production` enables prod-only behavior in server.js (production # stickers path under dist/, production-mode logger). Use # `development` locally to read stickers from public/ instead. NODE_ENV=development # Pino log level. Comment out for `info` (default). Useful values: # trace, debug, info, warn, error, fatal # Set to `debug` when diagnosing a problem; revert before deploy. # LOG_LEVEL=info # CORS — uncomment and set when the frontend is served from a # different origin than this API. Single origin or comma-separated. # CORS_ORIGIN=https://your-domain.com # Upload / export TTL and sweep interval, in milliseconds. # Defaults (24h TTL, 1h sweep) work for most cases. Lower the TTL # if disk space is tight; lower the interval if uploads churn fast # and you want stale files cleaned sooner. # FILE_TTL_MS=86400000 # 24 hours # CLEANUP_INTERVAL_MS=3600000 # 1 hour # ────────────────────────────────────────────────────────────────── # Build-time — values the `docker compose build` step uses # ────────────────────────────────────────────────────────────────── # Only needed when BUILDING the image, not when running it. The # image talks to git.kadil.dev to fetch the `goods-editor` git+ssh: # npm dependency during `npm install`. See the Dockerfile docblock # for the full mechanism. # # The Dockerfile expects a BASE64-ENCODED private key (not raw PEM) # because that's the format Dokploy's Build-time Secrets textarea # requires — it's dotenv-parsed and can't handle multi-line values. # We use base64 for local builds too so the Dockerfile has one input # format. Encode like this: # # base64 < ~/.ssh/goods-editor-deploy | tr -d '\n' > /tmp/key.b64 # # Recommended: generate a dedicated read-only deploy key rather than # reusing a personal key (see Dockerfile docblock for the ssh-keygen # + Gitea deploy-key registration steps). # # Path to a base64-encoded key file. Uncomment one for local builds: # SSH_KEY_FILE=/Users/khalid/.ssh/goods-editor-deploy.b64 # SSH_KEY_FILE=/home/deploy/.ssh/goods-editor-deploy.b64 # Alternative: env-var-based (CI). To use this mode, also flip # docker-compose.yml's `secrets.ssh_key` block from `file:` to # `environment:` (see comments there). Set the base64 contents via # the shell or your CI secret store: # # SSH_KEY_B64="$(base64 < ~/.ssh/goods-editor-deploy | tr -d '\n')" \ # docker compose build # # Don't put the actual base64 in this .env file. The string is long # enough that dotenv parsers may struggle, and committing real key # material — even base64 — to a repo is a leak waiting to happen. # # ── Dokploy ─────────────────────────────────────────────────────── # The entries above DON'T apply to Dokploy. In Dokploy, paste the # base64 directly into the application's Environment → Build-time # Secrets textarea as a single line: # # ssh_key= # # Dokploy parses that textarea as dotenv and passes the value into # the build as a BuildKit secret named `ssh_key`.