infra(pg-services): 🧱 Update PostgreSQL service configs in Docker Compose and rendering logic
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
2c159a2a91
commit
25a6718033
3 changed files with 56 additions and 0 deletions
21
infrastructure/compose.quinn.yml
Normal file
21
infrastructure/compose.quinn.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
services:
|
||||
quinn-db-quinn:
|
||||
image: postgres:16-alpine
|
||||
container_name: quinn-db-quinn
|
||||
environment:
|
||||
POSTGRES_DB: quinn
|
||||
POSTGRES_USER: quinn
|
||||
POSTGRES_PASSWORD: devpassword
|
||||
ports:
|
||||
- "25435:5432"
|
||||
volumes:
|
||||
- quinn-db-data:/var/lib/postgresql/data
|
||||
- ../sql/quinn-db-init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U quinn -d quinn"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
quinn-db-data:
|
||||
13
infrastructure/pg-services.yml
Normal file
13
infrastructure/pg-services.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
services:
|
||||
quinn:
|
||||
port: 25435
|
||||
db: quinn
|
||||
user: quinn
|
||||
init_sql: infrastructure/sql/quinn-db-init.sql
|
||||
role: curated
|
||||
icloud:
|
||||
port: 25436
|
||||
db: quinn_icloud
|
||||
user: quinn_icloud
|
||||
init_sql: infrastructure/sql/quinn-icloud-init.sql
|
||||
role: raw_sync
|
||||
22
render-pg-services.mjs
Normal file
22
render-pg-services.mjs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { renderServices } from '/var/home/lilith/Code/@packages/@infra/pg-service-template/dist/render.js';
|
||||
import { resolve } from 'path';
|
||||
|
||||
const projectRoot = resolve('/var/home/lilith/Code/@projects/@lilith/lilith-platform.live');
|
||||
const manifestPath = resolve(projectRoot, 'infrastructure/pg-services.yml');
|
||||
const outputDir = resolve(projectRoot, 'infrastructure/generated');
|
||||
|
||||
try {
|
||||
const result = await renderServices(manifestPath, outputDir, projectRoot);
|
||||
|
||||
console.log('=== Env Entries ===');
|
||||
for (const entry of result.envEntries) {
|
||||
console.log(`${entry.name}=${entry.value}`);
|
||||
}
|
||||
console.log('\n=== Compose Files ===');
|
||||
console.log('Generated in:', outputDir);
|
||||
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('Render failed:', error.message);
|
||||
process.exit(1);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue