This repository contains the infrastructure configuration for the Devfolio project, using Docker Compose to orchestrate services including PostgreSQL and Keycloak.
A PostgreSQL 14 instance that serves as the primary database for both the core application and Keycloak.
- Host:
localhost(Internal:postgres-core) - Port:
5432 - User:
core_user - Password:
core_password - Databases Initialized:
keycloak: Used by Keycloak for identity management.core_db: Main application database.
An open-source identity and access management solution.
- URL: http://localhost:5000
- Admin Credentials:
- Username:
admin - Password:
admin
- Username:
- Version:
26.5.3 - Auto-Import: The realm configuration is automatically imported from
realm-export.jsonon startup. - SMTP Password Injection:
KEYCLOAK_SMTP_PASSWORDis injected into the realm file before Keycloak starts.
-
Clone the repository:
git clone <repository-url> cd devfolio-infra
-
Start the services:
- Set SMTP password in your shell (PowerShell):
$env:KEYCLOAK_SMTP_PASSWORD="your-smtp-app-password"
- Or create a
.envfile in project root:KEYCLOAK_SMTP_PASSWORD=your-smtp-app-password
- Set SMTP password in your shell (PowerShell):
-
Start the services:
docker-compose up -d
-
Verify the services:
- Check if containers are running:
docker-compose ps - Keycloak should be accessible at
http://localhost:5000.
- Check if containers are running:
- docker-compose.yml: Defines the services, networks, and volumes.
- init.sql: SQL script executed on database initialization to create the necessary databases.
- realm-export.json: Keycloak realm configuration for automatic import.
- The PostgreSQL container uses a persistent volume named
core_db_data. - Timezone is set to
Asia/Yangon. - Keycloak is running in development mode (
start-dev). - Keycloak startup fails fast if
KEYCLOAK_SMTP_PASSWORDis missing, preventing import with an invalid SMTP password.