-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
202 lines (194 loc) · 5.33 KB
/
docker-compose.yml
File metadata and controls
202 lines (194 loc) · 5.33 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
services:
# LNPixels API
# Retry trigger: 2026-02-13 15:53
api:
build:
context: ./lnpixels/api
user: "1000:1000"
ports:
- "127.0.0.1:3000:3000"
env_file:
- .env
volumes:
# Mount directory instead of individual files for SQLite WAL mode compatibility
- ./data/lnpixels:/app/data
- ./backups:/app/backups
environment:
- PORT=3000
- NODE_ENV=production
- DB_PATH=/app/data/pixels.db
- POSTGRES_URL=postgresql://postgres:postgres@postgres:5432/pixel_agent
- API_URL=http://api:3000/api
networks:
- pixel-net
restart: unless-stopped
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://127.0.0.1:3000/api/stats" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M
# [V2 MIGRATION] Removed: narrative-correlator, temporal-precision, docu-gardener
# These V1 services are no longer needed. Recoverable from git history.
# LNPixels Web App (Canvas)
web:
build:
context: ./lnpixels/lnpixels-app
args:
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://127.0.0.1:3000/api}
ports:
- "127.0.0.1:3002:3002"
env_file:
- .env
environment:
- NODE_ENV=production
- HOSTNAME=0.0.0.0
networks:
- pixel-net
depends_on:
api:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://127.0.0.1:3002/" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M
# Pixel Landing Page
landing:
build:
context: ./pixel-landing
args:
- NEXT_PUBLIC_CANVAS_URL=${NEXT_PUBLIC_CANVAS_URL:-https://ln.pixel.xx.kg}
- NEXT_PUBLIC_AGENT_HANDLE=${NEXT_PUBLIC_AGENT_HANDLE:-@PixelSurvivor}
- NEXT_PUBLIC_LIGHTNING_ADDRESS=${NEXT_PUBLIC_LIGHTNING_ADDRESS:-sparepiccolo55@walletofsatoshi.com}
- NEXT_PUBLIC_BITCOIN_ADDRESS=${NEXT_PUBLIC_BITCOIN_ADDRESS:-bc1q7e33r989x03ynp6h4z04zygtslp5v8mcx535za}
ports:
- "127.0.0.1:3001:3001"
env_file:
- .env
environment:
- NODE_ENV=production
- HOSTNAME=0.0.0.0
networks:
- pixel-net
restart: unless-stopped
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://127.0.0.1:3001/" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
deploy:
resources:
limits:
memory: 128M
reservations:
memory: 64M
# Postgres Database - External DB for canvas (V1 - kept for revenue)
postgres:
image: pgvector/pgvector:pg15
ports:
- "127.0.0.1:5432:5432"
environment:
- POSTGRES_DB=pixel_agent
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- ./data/postgres:/var/lib/postgresql/data
networks:
- pixel-net
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -d pixel_agent" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
deploy:
resources:
limits:
memory: 300M
reservations:
memory: 150M
# pgAdmin - PostgreSQL Web GUI (not started by default)
# Start manually: docker compose --profile tools up -d pgadmin
# Access via SSH tunnel: ssh -L 5050:127.0.0.1:5050 user@vps
pgadmin:
profiles: [ "tools" ]
image: dpage/pgadmin4:latest
ports:
- "127.0.0.1:5050:80"
environment:
- PGADMIN_DEFAULT_EMAIL=pixel@example.com
- PGADMIN_DEFAULT_PASSWORD=pixel123
- PGADMIN_CONFIG_SERVER_MODE=False
- PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED=False
- PGADMIN_SERVER_JSON_FILE=/pgadmin4/servers.json
volumes:
- ./data/pgadmin:/var/lib/pgadmin
- ./data/pgadmin-servers.json:/pgadmin4/servers.json:ro
networks:
- pixel-net
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
deploy:
resources:
limits:
memory: 128M
reservations:
memory: 64M
# Nginx Reverse Proxy
nginx:
image: nginx:alpine
command: [ "nginx", "-g", "daemon off; error_log /dev/null emerg;" ]
logging:
driver: "none"
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./certbot/conf:/etc/letsencrypt:ro
- ./certbot/www:/var/www/certbot:ro
- ./nostr-relay/stats.json:/var/www/relay/stats.json:ro
networks:
- pixel-net
depends_on:
- api
- web
- landing
restart: unless-stopped
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://127.0.0.1/health" ]
interval: 30s
timeout: 10s
retries: 3
deploy:
resources:
limits:
memory: 64M
reservations:
memory: 32M
# [V2 MIGRATION] Removed: velocity-monitor, opencode-logs, vps-monitor,
# bitcoin, lightning, certbot, backup
# These V1 services are no longer needed. Recoverable from git history.
# Lightning replaced by NWC/Alby. Certbot replaced by Caddy auto-HTTPS.
networks:
pixel-net:
driver: bridge