mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-03 02:27:57 +09:00
28 lines
740 B
YAML
28 lines
740 B
YAML
services:
|
|
db:
|
|
image: postgres:16
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:?}
|
|
POSTGRES_USER: ${POSTGRES_USER:?}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
ports:
|
|
- "${PGPORT:?}:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
interval: 2s
|
|
timeout: 2s
|
|
retries: 30
|
|
|
|
postgrest:
|
|
image: postgrest/postgrest:v12.2.12
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
PGRST_DB_URI: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
|
|
PGRST_DB_SCHEMAS: public
|
|
PGRST_DB_ANON_ROLE: ${POSTGRES_USER}
|
|
PGRST_SERVER_PORT: 3000
|
|
ports:
|
|
- "${POSTGREST_PORT:?}:3000"
|