3 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
2e1142dba5 fix: resolve Portainer redeployment issues
Co-authored-by: xCyanGrizzly <53275238+xCyanGrizzly@users.noreply.github.com>
2026-03-04 13:26:13 +00:00
copilot-swe-agent[bot]
13fa559f51 Initial plan 2026-03-04 13:16:37 +00:00
xCyanGrizzly
5079e65783 Merge pull request #1 from xCyanGrizzly/copilot/fix-docker-compose-error
fix: copy prisma CLI binary into production Docker image
2026-03-04 14:11:32 +01:00
2 changed files with 13 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ services:
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
pull_policy: build
ports: ports:
- "${APP_PORT:-3000}:3000" - "${APP_PORT:-3000}:3000"
environment: environment:
@@ -34,10 +35,11 @@ services:
build: build:
context: . context: .
dockerfile: worker/Dockerfile dockerfile: worker/Dockerfile
pull_policy: build
environment: environment:
- DATABASE_URL=postgresql://${POSTGRES_USER:-dragons}:${POSTGRES_PASSWORD:-stash}@db:5432/${POSTGRES_DB:-dragonsstash} - DATABASE_URL=postgresql://${POSTGRES_USER:-dragons}:${POSTGRES_PASSWORD:-stash}@db:5432/${POSTGRES_DB:-dragonsstash}
- TELEGRAM_API_ID=${TELEGRAM_API_ID:?Set TELEGRAM_API_ID in .env} - TELEGRAM_API_ID=${TELEGRAM_API_ID:-}
- TELEGRAM_API_HASH=${TELEGRAM_API_HASH:?Set TELEGRAM_API_HASH in .env} - TELEGRAM_API_HASH=${TELEGRAM_API_HASH:-}
- WORKER_INTERVAL_MINUTES=${WORKER_INTERVAL_MINUTES:-60} - WORKER_INTERVAL_MINUTES=${WORKER_INTERVAL_MINUTES:-60}
- WORKER_TEMP_DIR=/tmp/zips - WORKER_TEMP_DIR=/tmp/zips
- TDLIB_STATE_DIR=/data/tdlib - TDLIB_STATE_DIR=/data/tdlib
@@ -65,11 +67,12 @@ services:
build: build:
context: . context: .
dockerfile: bot/Dockerfile dockerfile: bot/Dockerfile
pull_policy: build
environment: environment:
- DATABASE_URL=postgresql://${POSTGRES_USER:-dragons}:${POSTGRES_PASSWORD:-stash}@db:5432/${POSTGRES_DB:-dragonsstash} - DATABASE_URL=postgresql://${POSTGRES_USER:-dragons}:${POSTGRES_PASSWORD:-stash}@db:5432/${POSTGRES_DB:-dragonsstash}
- BOT_TOKEN=${BOT_TOKEN:?Set BOT_TOKEN in .env} - BOT_TOKEN=${BOT_TOKEN:-}
- TELEGRAM_API_ID=${TELEGRAM_API_ID:?Set TELEGRAM_API_ID in .env} - TELEGRAM_API_ID=${TELEGRAM_API_ID:-}
- TELEGRAM_API_HASH=${TELEGRAM_API_HASH:?Set TELEGRAM_API_HASH in .env} - TELEGRAM_API_HASH=${TELEGRAM_API_HASH:-}
- LOG_LEVEL=${LOG_LEVEL:-info} - LOG_LEVEL=${LOG_LEVEL:-info}
volumes: volumes:
- tdlib_bot_state:/data/tdlib - tdlib_bot_state:/data/tdlib

View File

@@ -13,6 +13,11 @@ async function main(): Promise<void> {
log.info("DragonsStash Telegram Worker starting"); log.info("DragonsStash Telegram Worker starting");
log.info({ config: { ...config, databaseUrl: "***" } }, "Configuration loaded"); log.info({ config: { ...config, databaseUrl: "***" } }, "Configuration loaded");
if (!config.telegramApiId || !config.telegramApiHash) {
log.fatal("TELEGRAM_API_ID and TELEGRAM_API_HASH are both required");
process.exit(1);
}
// Ensure temp directory exists // Ensure temp directory exists
await mkdir(config.tempDir, { recursive: true }); await mkdir(config.tempDir, { recursive: true });
await mkdir(config.tdlibStateDir, { recursive: true }); await mkdir(config.tdlibStateDir, { recursive: true });