build: package persistent deployment and maintenance commands
This commit is contained in:
@@ -3,13 +3,16 @@ services:
|
||||
image: ${PORTFOLIO_IMAGE:-amiirkhl-portfolio:latest}
|
||||
container_name: portfolio-app
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
SITE_URL: ${SITE_URL:-https://portfolio.example.com}
|
||||
DATA_DIR: /data
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"node",
|
||||
"-e",
|
||||
"fetch('http://127.0.0.1:3000/').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))",
|
||||
"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
|
||||
@@ -17,6 +20,7 @@ services:
|
||||
retries: 30
|
||||
volumes:
|
||||
- next-image-cache:/app/.next/cache
|
||||
- portfolio-data:/data
|
||||
networks:
|
||||
- caddy_proxy
|
||||
|
||||
@@ -27,3 +31,4 @@ networks:
|
||||
|
||||
volumes:
|
||||
next-image-cache:
|
||||
portfolio-data:
|
||||
|
||||
Reference in New Issue
Block a user