mirror of
https://github.com/Evil0ctal/WeChat-Channels-Video-File-Decryption.git
synced 2026-04-09 20:41:27 +08:00
Add API Services
This commit is contained in:
52
api-service/docker-compose.yml
Normal file
52
api-service/docker-compose.yml
Normal 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
|
||||
Reference in New Issue
Block a user