55 lines
1.7 KiB
YAML
55 lines
1.7 KiB
YAML
# Pulls the published image from Docker Hub — no local build path here.
|
|
# Use `./build.sh` to (re)publish the image; this file only consumes it.
|
|
#
|
|
# Usage:
|
|
# docker compose pull # fetch latest from Hub
|
|
# docker compose up -d # start
|
|
# APP_PORT=8080 docker compose up -d # override host port
|
|
# docker compose down # stop + remove
|
|
#
|
|
# Compose v2.24+ (required for `env_file: path/required` syntax).
|
|
|
|
services:
|
|
app:
|
|
image: renolation/places:latest
|
|
container_name: places
|
|
restart: unless-stopped
|
|
pull_policy: always
|
|
ports:
|
|
- "${APP_PORT:-3000}:3000"
|
|
|
|
# Env vars are loaded from .env.local at container start (if present).
|
|
# Useful for ad-hoc overrides; baseline values are in `environment:` below.
|
|
env_file:
|
|
- path: .env.local
|
|
required: false
|
|
|
|
# Explicit values that always apply (these win over .env.local).
|
|
environment:
|
|
NODE_ENV: production
|
|
PORT: "3000"
|
|
HOSTNAME: "0.0.0.0"
|
|
PGHOST: 103.188.82.191
|
|
PGUSER: renolation
|
|
PGPASSWORD: renolation
|
|
PGDATABASE: places_db
|
|
PGPORT: "5432"
|
|
|
|
# Cloudflare R2 — image storage
|
|
R2_ENDPOINT: https://a825ab8ed865a9e0bfbf99feca3694e8.r2.cloudflarestorage.com
|
|
R2_BUCKET: places
|
|
R2_ACCESS_KEY_ID: 456ee3bb8c537fc6441f87e1e62c5631
|
|
R2_SECRET_ACCESS_KEY: 7c9081e46301ecd0196cbe24f4fc05c0841d0720d3e33d198b1f8659f87757aa
|
|
R2_PUBLIC_URL: https://cdn.renolation.com
|
|
|
|
healthcheck:
|
|
test:
|
|
- "CMD"
|
|
- "node"
|
|
- "-e"
|
|
- "fetch('http://localhost:3000/login').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 15s
|