feat: optimize blog build and deployment

This commit is contained in:
liumangmang
2026-05-11 01:35:38 +08:00
parent b4653e209c
commit 1b3e4c33a4
21 changed files with 10015 additions and 523 deletions
+28
View File
@@ -3,6 +3,34 @@ services:
image: myblog:latest
build:
context: .
args:
ENCRYPT_PASSWORD: ${ENCRYPT_PASSWORD:?Set ENCRYPT_PASSWORD in .env or shell before building}
environment:
ENCRYPT_PASSWORD: ${ENCRYPT_PASSWORD:?Set ENCRYPT_PASSWORD in .env or shell before starting}
ports:
- '51888:80'
restart: unless-stopped
healthcheck:
test: ['CMD', 'wget', '-qO-', 'http://127.0.0.1/']
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
logging:
driver: json-file
options:
max-size: '10m'
max-file: '3'
deploy:
resources:
limits:
cpus: '1.00'
memory: 256M
reservations:
memory: 64M
networks:
- myblog-net
networks:
myblog-net:
driver: bridge