Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (92 loc) · 2.7 KB
/
Copy pathdocker-compose.yml
File metadata and controls
99 lines (92 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version: '3.8'
services:
# 1. Nginx Reverse Proxy Gateway (Custom Domain, SSL & Subdomain Router)
ethenengine-gateway:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- ethenengine-core
- ethenengine-rust
- ethenengine-keycloak
- mailcow-postfix
restart: always
# 2. Node.js / Bun Core Platform API Server
ethenengine-core:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
- DATABASE_URL=${DATABASE_URL:-postgres://platform:secretpassword@ethenengine-db:5432/ethenenginedb}
- KEYCLOAK_URL=http://ethenengine-keycloak:8080
- KEYCLOAK_REALM=ethenengine
- SMTP_HOST=mailcow-postfix
- SMTP_PORT=25
- SMTP_FROM=noreply@ethenengine.com
depends_on:
- ethenengine-db
- ethenengine-keycloak
- mailcow-postfix
restart: always
# 3. Rust High-Performance Microservices (Image & Vector Search Worker)
ethenengine-rust:
build:
context: ./services/rust-services
dockerfile: Dockerfile
ports:
- "8081:8080"
restart: always
# 4. Keycloak IAM (Identity & Access Management for Enterprise Multi-Tenancy)
ethenengine-keycloak:
image: quay.io/keycloak/keycloak:24.0
command: start-dev
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=keycloaksecret
- KC_DB=postgres
- KC_DB_URL=jdbc:postgresql://ethenengine-db:5432/keycloakdb
- KC_DB_USERNAME=platform
- KC_DB_PASSWORD=secretpassword
- KC_HEALTH_ENABLED=true
ports:
- "8080:8080"
depends_on:
- ethenengine-db
volumes:
- ./services/keycloak-theme:/opt/keycloak/themes/ethenengine
restart: always
# 5. Mailcow Postfix SMTP Gateway Engine
mailcow-postfix:
image: boky/postfix:latest
environment:
- POSTFIX_myhostname=mail.ethenengine.com
- POSTFIX_mydomain=ethenengine.com
- POSTFIX_myorigin=ethenengine.com
- ALLOWED_SENDER_DOMAINS=ethenengine.com
- POSTFIX_mynetworks=127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
ports:
- "25:25"
- "587:587"
restart: always
# 6. PostgreSQL Production Database (Platform DB & Keycloak DB)
ethenengine-db:
image: postgres:16-alpine
environment:
POSTGRES_USER: platform
POSTGRES_PASSWORD: secretpassword
POSTGRES_DB: ethenenginedb
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./prisma/init-keycloak-db.sql:/docker-entrypoint-initdb.d/init-keycloak-db.sql
restart: always
volumes:
postgres_data: