mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-17 18:05:42 +02:00
Add PostgreSQL profile for dev mode (#10582)
Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
@@ -295,6 +295,14 @@
|
||||
"safeForSimultaneousRushProcesses": true,
|
||||
"shellCommand": "cd ./dev && docker compose -f docker-compose.yaml -f docker-compose.min.yaml up -d --force-recreate"
|
||||
},
|
||||
{
|
||||
"commandKind": "global",
|
||||
"name": "docker:up:pg",
|
||||
"summary": "Up development stack with PostgreSQL",
|
||||
"description": "Start dev docker compose with PostgreSQL override (docker-compose.yaml + docker-compose.pg.yaml, profile=postgres)",
|
||||
"safeForSimultaneousRushProcesses": true,
|
||||
"shellCommand": "cd ./dev && docker compose -f docker-compose.yaml -f docker-compose.pg.yaml --profile postgres up -d --force-recreate"
|
||||
},
|
||||
{
|
||||
"commandKind": "global",
|
||||
"name": "docker:local",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
STORAGE_CONFIG="datalake|http://huly.local:4030"
|
||||
MONGO_URL=mongodb://mongodb:27017?compressors=snappy
|
||||
DB_URL_PG=postgresql://postgres:example@postgres:5432
|
||||
DB_URL_PG=postgres://postgres:postgres@postgres:5432/postgres
|
||||
BACKUP_STORAGE_CONFIG="minio|minio?accessKey=minioadmin&secretKey=minioadmin"
|
||||
BACKUP_BUCKET_NAME=dev-backups
|
||||
DB_CR_URL=postgresql://root@huly.local:26257/defaultdb?sslmode=disable
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
# PostgreSQL override: adds a local Postgres instance for dev.
|
||||
# Use with: docker compose -f docker-compose.yaml -f docker-compose.pg.yaml --profile postgres up
|
||||
#
|
||||
# This does NOT change any DB_URLs automatically; services will still use whatever
|
||||
# connection string you configure via env (e.g. DB_URL_PG in dev/.env).
|
||||
|
||||
services:
|
||||
postgres:
|
||||
profiles: ["postgres"]
|
||||
image: postgres:16
|
||||
extra_hosts:
|
||||
- "huly.local:host-gateway"
|
||||
command: ["postgres", "-p", "5432"]
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres -p 5432"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
ports:
|
||||
- 5432:5432
|
||||
environment:
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
- POSTGRES_DB=postgres
|
||||
restart: unless-stopped
|
||||
|
||||
account:
|
||||
environment:
|
||||
- DB_URL=${DB_URL_PG}
|
||||
|
||||
workspace_cockroach:
|
||||
environment:
|
||||
- DB_URL=${DB_URL_PG}
|
||||
- ACCOUNTS_DB_URL=${DB_URL_PG}
|
||||
|
||||
transactor_cockroach:
|
||||
environment:
|
||||
- DB_URL=${DB_URL_PG}
|
||||
- COMMUNICATION_API_ENABLED=false
|
||||
|
||||
fulltext_cockroach:
|
||||
environment:
|
||||
- DB_URL=${DB_URL_PG}
|
||||
- COMMUNICATION_API_ENABLED=false
|
||||
|
||||
export:
|
||||
environment:
|
||||
- DB_URL=${DB_URL_PG}
|
||||
|
||||
datalake:
|
||||
environment:
|
||||
- DB_URL=${DB_URL_PG}
|
||||
|
||||
front:
|
||||
environment:
|
||||
- COMMUNICATION_API_ENABLED=false
|
||||
|
||||
Reference in New Issue
Block a user