Files
soroushasadi/docker-compose.yml
T
soroush.asadi fcc476e432
deploy / deploy (push) Successful in 12s
Fix critical port conflict: move portfolio off Gitea's port 3000
Host port 3000 is Gitea (git.soroushasadi.com proxies to :3000). The
portfolio was publishing 3000:3000 AND the deploy had a "Free Port 3000"
step that force-removed every container on :3000 — which evicted the
Gitea container.

- compose: publish 3020:3000 instead of 3000:3000
- deploy: delete the "Free Port 3000" step entirely; compose recreates
  only our own named container and must never touch other stacks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 08:43:23 +03:30

36 lines
1.0 KiB
YAML

name: soroushasadi
services:
web:
build:
context: .
dockerfile: Dockerfile
args:
DOTNET_IMAGE: ${DOTNET_IMAGE:-mcr.microsoft.com/dotnet/aspnet:10.0-alpine}
SDK_IMAGE: ${SDK_IMAGE:-mcr.microsoft.com/dotnet/sdk:10.0-alpine}
image: soroushasadi-site:latest
container_name: soroushasadi-site
restart: unless-stopped
# Host port 3020 → container 3000. Port 3000 on the host is Gitea
# (git.soroushasadi.com proxies to :3000) — NEVER publish on 3000.
ports:
- "3020:3000"
environment:
ASPNETCORE_ENVIRONMENT: Production
DataDir: /data
ADMIN_PASSWORD: ${ADMIN_PASSWORD:?set ADMIN_PASSWORD}
RESEND_API_KEY: ${RESEND_API_KEY:-}
CONTACT_INBOX: ${CONTACT_INBOX:-}
CONTACT_FROM: ${CONTACT_FROM:-}
volumes:
- cms-data:/data
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:3000/ || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
volumes:
cms-data: