Files
soroushasadi/docker-compose.yml
T
soroush.asadi 20e14d3a28
deploy / deploy (push) Failing after 7m35s
Fix base image: use mirror direct path, switch to node:20-alpine
Mirror exposes images as mirror.soroushasadi.com/<image> directly,
not via /repository/docker-group/ path. Also node:20-alpine is already
cached on the server; node:20-slim was never pulled.

Dockerfile: apk instead of apt-get, addgroup/adduser instead of
groupadd/useradd (Alpine BusyBox compatibility).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 14:46:05 +03:30

36 lines
962 B
YAML

name: soroushasadi
services:
web:
build:
context: .
dockerfile: Dockerfile
args:
NODE_IMAGE: ${NODE_IMAGE:-mirror.soroushasadi.com/node:20-alpine}
NPM_TOKEN: ${NPM_TOKEN:-}
image: soroushasadi-site:latest
container_name: soroushasadi-site
restart: unless-stopped
ports:
- "3000:3000"
environment:
NODE_ENV: production
DATA_DIR: /data
ADMIN_PASSWORD: ${ADMIN_PASSWORD:?set ADMIN_PASSWORD}
ADMIN_SESSION_SECRET: ${ADMIN_SESSION_SECRET:?set ADMIN_SESSION_SECRET}
RESEND_API_KEY: ${RESEND_API_KEY:-}
CONTACT_INBOX: ${CONTACT_INBOX:-}
CONTACT_FROM: ${CONTACT_FROM:-}
volumes:
- cms-data:/data
healthcheck:
test: ["CMD", "node", "-e",
"fetch('http://127.0.0.1:3000/').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
cms-data: