Add API Services

This commit is contained in:
Evil0ctal
2025-10-17 03:19:05 -07:00
parent 5113e57b8f
commit e19f14ce54
16 changed files with 2235869 additions and 8 deletions

View File

@@ -0,0 +1,52 @@
version: '3.8'
name: wechat-decrypt-api
services:
wechat-decrypt-api:
build:
context: .
dockerfile: Dockerfile
image: wechat-decrypt-api:playwright
container_name: wechat-decrypt-api
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
restart: unless-stopped
# Resource limits
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
cpus: '1'
memory: 512M
# Security options
security_opt:
- no-new-privileges:true
# Health check
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (r) => { process.exit(r.statusCode === 200 ? 0 : 1); }).on('error', () => process.exit(1));"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# Shared memory size for Chromium
shm_size: '2gb'
networks:
- wechat-decrypt-network
networks:
wechat-decrypt-network:
driver: bridge