-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (70 loc) · 2.8 KB
/
docker-compose.yml
File metadata and controls
76 lines (70 loc) · 2.8 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
# ══════════════════════════════════════════════════════════════════════════════
# RETE - Docker Compose Configuration
#
# Usage:
# cp .env.example .env # Configure environment variables
# docker compose up -d # Start all services
# docker compose logs -f # View logs
# docker compose down # Stop all services
# ══════════════════════════════════════════════════════════════════════════════
services:
# ── PostgreSQL Database ─────────────────────────────────────────────────────
db:
image: postgres:16-alpine
container_name: rete-db
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-rete}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-rete_password}
POSTGRES_DB: ${POSTGRES_DB:-rete}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "${DB_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-rete} -d ${POSTGRES_DB:-rete}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- rete-network
# ── RETE Application ────────────────────────────────────────────────────────
app:
build:
context: .
dockerfile: Dockerfile
container_name: rete-app
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
# Database
DATABASE_URL: postgresql://${POSTGRES_USER:-rete}:${POSTGRES_PASSWORD:-rete_password}@db:5432/${POSTGRES_DB:-rete}
# Application
NODE_ENV: production
PORT: 5000
SESSION_SECRET: ${SESSION_SECRET:-change-me-in-production}
COOKIE_SECURE: ${COOKIE_SECURE:-true}
# Blockchain Configuration (Sepolia Testnet by default)
PRIVATE_KEY: ${PRIVATE_KEY:-}
RPC_URL: ${RPC_URL:-https://sepolia.infura.io/v3/YOUR_INFURA_KEY}
FACTORY_ADDRESS: ${FACTORY_ADDRESS:-}
CHAIN_ID: ${CHAIN_ID:-11155111}
WALLET_ENCRYPTION_KEY: ${WALLET_ENCRYPTION_KEY:-}
ports:
- "${APP_PORT:-5000}:5000"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5000/api/auth/me"]
interval: 30s
timeout: 10s
start_period: 30s
retries: 3
networks:
- rete-network
volumes:
postgres_data:
driver: local
networks:
rete-network:
driver: bridge