chore: simplify standalone Compose setup

This commit is contained in:
2026-09-16 10:18:31 +03:30
parent 76ab2d1078
commit f45efdc667
6 changed files with 118 additions and 110 deletions

View File

@@ -1,34 +1,24 @@
name: portfolio
services:
portfolio-app:
image: ${PORTFOLIO_IMAGE:-amiirkhl-portfolio:latest}
container_name: portfolio-app
image: portfolio:local
build:
context: .
target: runtime
args:
NPM_REGISTRY: ${NPM_REGISTRY:-https://registry.npmjs.org/}
restart: unless-stopped
ports:
- "${BIND_ADDRESS:-127.0.0.1}:${PORT:-3000}:3000"
environment:
SITE_URL: ${SITE_URL:-https://portfolio.example.com}
SITE_URL: ${SITE_URL:-http://localhost:3000}
DATA_DIR: /data
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:3000/api/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))",
]
interval: 2s
timeout: 2s
start_period: 3s
retries: 30
BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET:-}
volumes:
- next-image-cache:/app/.next/cache
- portfolio-data:/data
networks:
- caddy_proxy
networks:
caddy_proxy:
external: true
name: caddy_proxy
- next-image-cache:/app/.next/cache
volumes:
next-image-cache:
portfolio-data:
name: ${PORTFOLIO_DATA_VOLUME:-portfolio_portfolio-data}
next-image-cache:
name: ${PORTFOLIO_CACHE_VOLUME:-portfolio_next-image-cache}