Files
podux/deploy/docker-compose.build.yml
T

62 lines
1.2 KiB
YAML

version: '3.8'
# Local build version: build the Docker image from source code
# Usage: docker compose -f docker-compose.build.yml up -d
services:
podux:
build:
context: ..
dockerfile: Dockerfile
args:
VERSION: ${VERSION:-latest}
BUILD_TIME: ${BUILD_TIME:-$(date -u '+%Y-%m-%d_%H:%M:%S')}
image: podux:${VERSION:-latest}
container_name: podux
restart: unless-stopped
ports:
- "8090:8090"
volumes:
- podux-data:/app/pb_data
environment:
- TZ=Asia/Shanghai
# Resource limits (optional)
deploy:
resources:
limits:
cpus: '2'
memory: 1G
reservations:
cpus: '0.5'
memory: 256M
# Network mode (optional)
# Uncomment if you need host network for better frpc performance
# network_mode: host
# Logging
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8090/api/health"]
interval: 30s
timeout: 3s
start_period: 10s
retries: 3
volumes:
podux-data:
driver: local
networks:
default:
name: podux-network