docker-compose.yml raw
1 # Docker Compose for Stella's Nostr Relay
2 # Owner: npub1v30tsz9vw6ylpz63g0a702nj3xa26t3m7p5us8f2y2sd8v6cnsvq465zjx
3
4 services:
5 orly-relay:
6 build:
7 context: ../..
8 dockerfile: Dockerfile
9 image: silberengel/next-orly:latest
10 container_name: orly-relay
11 restart: unless-stopped
12 ports:
13 - "127.0.0.1:7777:7777"
14 volumes:
15 - relay_data:/data
16 - ./profiles:/profiles:ro
17 environment:
18 # Relay Configuration
19 - ORLY_DATA_DIR=/data
20 - ORLY_LISTEN=0.0.0.0
21 - ORLY_PORT=7777
22 - ORLY_LOG_LEVEL=info
23 - ORLY_DB_LOG_LEVEL=error
24 - ORLY_OWNERS=npub1v30tsz9vw6ylpz63g0a702nj3xa26t3m7p5us8f2y2sd8v6cnsvq465zjx
25 - ORLY_ADMINS=npub1v30tsz9vw6ylpz63g0a702nj3xa26t3m7p5us8f2y2sd8v6cnsvq465zjx,npub1m4ny6hjqzepn4rxknuq94c2gpqzr29ufkkw7ttcxyak7v43n6vvsajc2jl,npub1l5sga6xg72phsz5422ykujprejwud075ggrr3z2hwyrfgr7eylqstegx9z
26
27 # ACL and Spider Configuration
28 - ORLY_ACL_MODE=follows
29
30 # Bootstrap relay URLs for initial sync
31 - ORLY_BOOTSTRAP_RELAYS=wss://profiles.nostr1.com,wss://purplepag.es,wss://relay.damus.io
32
33 # Subscription Settings (optional)
34 - ORLY_SUBSCRIPTION_ENABLED=false
35 - ORLY_MONTHLY_PRICE_SATS=0
36
37 # Performance Settings
38 - ORLY_MAX_CONNECTIONS=1000
39 - ORLY_MAX_EVENT_SIZE=65536
40 - ORLY_MAX_SUBSCRIPTIONS=20
41
42 healthcheck:
43 test: ["CMD", "curl", "-f", "http://localhost:7777"]
44 interval: 30s
45 timeout: 10s
46 retries: 3
47 start_period: 10s
48
49 # Resource limits
50 deploy:
51 resources:
52 limits:
53 memory: 1G
54 cpus: "1.0"
55 reservations:
56 memory: 256M
57 cpus: "0.25"
58
59 # Logging configuration
60 logging:
61 driver: "json-file"
62 options:
63 max-size: "10m"
64 max-file: "3"
65
66 # Optional: Nginx reverse proxy for SSL/domain setup
67 nginx:
68 image: nginx:alpine
69 container_name: stella-nginx
70 restart: unless-stopped
71 ports:
72 - "80:80"
73 - "443:443"
74 volumes:
75 - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
76 - ./nginx/ssl:/etc/nginx/ssl:ro
77 - nginx_logs:/var/log/nginx
78 depends_on:
79 - orly-relay
80 profiles:
81 - proxy # Only start with: docker-compose --profile proxy up
82
83 volumes:
84 relay_data:
85 driver: local
86 driver_opts:
87 type: none
88 o: bind
89 device: ./data
90 nginx_logs:
91 driver: local
92
93 networks:
94 default:
95 name: orly-relay-network
96