Files
ict-warehouse-allocation/deploy/compose.server.yaml
T
2026-07-23 07:25:49 +03:30

76 lines
1.6 KiB
YAML

name: warehouse-allocation
services:
api:
build:
context: ..
dockerfile: Dockerfile
image: local/warehouse-allocation:${APP_VERSION:-latest}
environment:
WA_ENVIRONMENT: production
WA_INVENTORY_BACKEND: redis
WA_REDIS_URL: redis://redis:6379/0
WA_REDIS_SOCKET_TIMEOUT_SECONDS: "0.08"
WA_MAX_CANDIDATE_WAREHOUSES: "33"
WA_INVENTORY_ADMIN_TOKEN: ${WA_INVENTORY_ADMIN_TOKEN:?inventory admin token is required}
ports:
- "127.0.0.1:18081:8080"
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
read_only: true
tmpfs:
- /tmp:size=32m,mode=1777
security_opt:
- no-new-privileges:true
mem_limit: 512m
healthcheck:
test:
- CMD
- python
- -c
- "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/health/ready', timeout=1)"
interval: 10s
timeout: 2s
retries: 5
start_period: 10s
logging:
driver: json-file
options:
max-size: 10m
max-file: "3"
redis:
image: redis:7.4-alpine
command:
- redis-server
- --appendonly
- "yes"
- --appendfsync
- everysec
- --maxmemory
- 384mb
- --maxmemory-policy
- noeviction
volumes:
- redis-data:/data
restart: unless-stopped
mem_limit: 512m
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 2s
retries: 10
security_opt:
- no-new-privileges:true
logging:
driver: json-file
options:
max-size: 10m
max-file: "3"
volumes:
redis-data: