# starts a postgres instance on port 5450 to use as a local db version: "3.8" services: db: image: postgres:16.2-alpine ports: - "${FORWARD_POSTGRES_PORT:-5450}:5432" # expose pg on port 5450 to not collide with pg from elswhere restart: always volumes: - db:/var/lib/postgresql/data environment: POSTGRES_DB: "risevest" POSTGRES_USER: "postgres" POSTGRES_PASSWORD: "postgres" POSTGRES_HOST_AUTH_METHOD: trust healthcheck: test: ["CMD-SHELL", "pg_isready"] interval: 10s timeout: 5s retries: 5 postgres_is_ready: image: postgres:16.2-alpine depends_on: db: condition: service_healthy cache: image: redis:alpine restart: always environment: - ALLOW_EMPTY_PASSWORD=yes ports: - "${FORWARD_REDIS_PORT:-6380}:6379" command: redis-server --save 20 1 --loglevel warning volumes: - cache:/data healthcheck: test: ["CMD", "redis-cli", "ping"] retries: 3 timeout: 5s api: container_name: risevest-api build: context: ./ image: risevest-api depends_on: - db - cache ports: - "${FORWARD_APP_PORT:-7500}:7500" environment: NODE_ENV: production PORT: 7500 DATABASE_URL: "postgres://default:EdKDLGP7Bo0U@ep-polished-king-14275187-pooler.us-east-1.postgres.vercel-storage.com:5432/verceldb?pgbouncer=true&connect_timeout=15" POSTGRES_URL_NON_POOLING: "postgres://default:EdKDLGP7Bo0U@ep-polished-king-14275187.us-east-1.postgres.vercel-storage.com:5432/verceldb" REDIS_HOST: 127.0.0.1 REDIS_PORT: 6380 SECRET_KEY: sk_123tt80sdxcggfrkfldlksf # REDIS_PASSWORD: eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81 links: - db - cache volumes: - ./:/src volumes: db: driver: local cache: driver: local