chore: sync submodule state (parent ref update)
Made-with: Cursor
This commit is contained in:
65
docker/docker-compose.as4.yml
Normal file
65
docker/docker-compose.as4.yml
Normal file
@@ -0,0 +1,65 @@
|
||||
# Docker Compose for AS4 Settlement Development
|
||||
# Includes: PostgreSQL, Redis, and AS4 services
|
||||
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:14
|
||||
environment:
|
||||
POSTGRES_USER: dbis_user
|
||||
POSTGRES_PASSWORD: dbis_password
|
||||
POSTGRES_DB: dbis_core
|
||||
POSTGRES_HOST_AUTH_METHOD: md5
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./postgres-init:/docker-entrypoint-initdb.d
|
||||
command:
|
||||
- "postgres"
|
||||
- "-c"
|
||||
- "listen_addresses=*"
|
||||
- "-c"
|
||||
- "max_connections=200"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U dbis_user"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
dbis-core:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: dbis_core/Dockerfile
|
||||
environment:
|
||||
DATABASE_URL: postgresql://dbis_user:dbis_password@postgres:5432/dbis_core
|
||||
REDIS_URL: redis://redis:6379
|
||||
AS4_BASE_URL: http://localhost:3000
|
||||
NODE_ENV: development
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ../dbis_core:/app
|
||||
- /app/node_modules
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
22
docker/postgres-init/01-init-hba.sh
Executable file
22
docker/postgres-init/01-init-hba.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# Initialize pg_hba.conf for external connections
|
||||
|
||||
set -e
|
||||
|
||||
echo "Configuring PostgreSQL for external connections..."
|
||||
|
||||
# Create custom pg_hba.conf that allows password authentication from all hosts
|
||||
cat > /var/lib/postgresql/pg_hba_custom.conf <<EOF
|
||||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
local all all trust
|
||||
host all all 127.0.0.1/32 md5
|
||||
host all all ::1/128 md5
|
||||
host all all 0.0.0.0/0 md5
|
||||
host all all ::/0 md5
|
||||
EOF
|
||||
|
||||
# Update postgresql.conf to use custom hba file
|
||||
echo "host all all 0.0.0.0/0 md5" >> /var/lib/postgresql/data/pg_hba.conf
|
||||
echo "host all all ::/0 md5" >> /var/lib/postgresql/data/pg_hba.conf
|
||||
|
||||
echo "PostgreSQL configured for external connections"
|
||||
Reference in New Issue
Block a user