CI / test (push) Successful in 5s
Update runtime defaults, compose mappings, frontend defaults, and developer docs to use port 8122 while keeping PostGIS reachable only via the internal compose network. Made-with: Cursor
79 lines
2.2 KiB
YAML
79 lines
2.2 KiB
YAML
services:
|
|
db:
|
|
image: postgis/postgis:17-3.5
|
|
container_name: momswap-backend-db
|
|
environment:
|
|
POSTGRES_DB: "${POSTGRES_DB:-momswap}"
|
|
POSTGRES_USER: "${POSTGRES_USER:-momswap}"
|
|
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-momswap}"
|
|
volumes:
|
|
- ./var/posrgres:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-momswap} -d ${POSTGRES_DB:-momswap}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 10s
|
|
restart: unless-stopped
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: runtime
|
|
cache_from:
|
|
- type=local,src=.docker/buildx-cache
|
|
cache_to:
|
|
- type=local,dest=.docker/buildx-cache,mode=max
|
|
image: momswap-backend:latest
|
|
container_name: momswap-backend-api
|
|
environment:
|
|
ADDR: ":8122"
|
|
ADMIN_PUBLIC_KEY: "${ADMIN_PUBLIC_KEY:-}"
|
|
DATABASE_URL: "postgres://${POSTGRES_USER:-momswap}:${POSTGRES_PASSWORD:-momswap}@db:5432/${POSTGRES_DB:-momswap}?sslmode=disable"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
ports:
|
|
- "8122:8122"
|
|
restart: unless-stopped
|
|
|
|
api-dev:
|
|
profiles: ["dev"]
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: dev
|
|
cache_from:
|
|
- type=local,src=.docker/buildx-cache
|
|
cache_to:
|
|
- type=local,dest=.docker/buildx-cache,mode=max
|
|
image: momswap-backend:dev
|
|
container_name: momswap-backend-api-dev
|
|
environment:
|
|
ADDR: ":8122"
|
|
ADMIN_PUBLIC_KEY: "${ADMIN_PUBLIC_KEY:-}"
|
|
DATABASE_URL: "postgres://${POSTGRES_USER:-momswap}:${POSTGRES_PASSWORD:-momswap}@db:5432/${POSTGRES_DB:-momswap}?sslmode=disable"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
ports:
|
|
- "8122:8122"
|
|
restart: unless-stopped
|
|
develop:
|
|
watch:
|
|
- action: sync+restart
|
|
path: ./web
|
|
target: /src/web
|
|
- action: sync+restart
|
|
path: ./internal
|
|
target: /src/internal
|
|
- action: sync+restart
|
|
path: ./cmd
|
|
target: /src/cmd
|
|
- action: rebuild
|
|
path: ./go.mod
|
|
- action: rebuild
|
|
path: ./Dockerfile
|
|
|