first commit!
Build Images and Deploy / Update-PROD-Stack (push) Failing after 15s

This commit is contained in:
2026-03-18 15:44:49 -04:00
commit 3b479f8382
56 changed files with 7387 additions and 0 deletions
+64
View File
@@ -0,0 +1,64 @@
services:
app:
image: reg.dev.nervesocket.com/hashex:latest
# Run migrations then start the web server
command: sh -c "npx prisma db push --accept-data-loss && npm start"
ports:
- "3000:3000"
environment:
DATABASE_URL: "${DATABASE_URL}"
NEXTAUTH_SECRET: "${NEXTAUTH_SECRET}"
NEXTAUTH_URL: "${NEXTAUTH_URL}"
REDIS_URL: "${REDIS_URL}"
MASTODON_INSTANCE: "${MASTODON_INSTANCE}"
MASTODON_ACCESS_TOKEN: "${MASTODON_ACCESS_TOKEN}"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
restart: unless-stopped
worker:
image: reg.dev.nervesocket.com/hashex:latest
command: npm run worker:prod
environment:
DATABASE_URL: "${DATABASE_URL}"
REDIS_URL: "${REDIS_URL}"
MASTODON_INSTANCE: "${MASTODON_INSTANCE}"
MASTODON_ACCESS_TOKEN: "${MASTODON_ACCESS_TOKEN}"
WORKER_RATE_LIMIT_MS: "${WORKER_RATE_LIMIT_MS:-2000}"
PRICE_UPDATE_INTERVAL_MINUTES: "${PRICE_UPDATE_INTERVAL_MINUTES:-60}"
MAX_PAGES_PER_HASHTAG: "${MAX_PAGES_PER_HASHTAG:-5}"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
restart: unless-stopped
postgres:
image: postgres:16-alpine
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: "${POSTGRES_DB:-hashex}"
POSTGRES_USER: "${POSTGRES_USER:-hashex}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-hashex}"]
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
volumes:
- redis_data:/data
restart: unless-stopped
volumes:
postgres_data:
redis_data: