hysteria_docker/docker-compose.yml
Olia Lisa b5f20b9aac feat(docker): set hysteria container name to project name
Update docker-compose.yml to use "${COMPOSE_PROJECT_NAME}" for the hysteria service container name, making it dynamic based on the project folder name for easier identification and to avoid naming conflicts in multi-project Docker deployments.
2025-11-26 09:52:18 +08:00

16 lines
435 B
YAML

services:
hysteria:
image: tobyxdd/hysteria:latest
container_name: "${COMPOSE_PROJECT_NAME}" # 容器名为文件夹名称
restart: always
network_mode: "host"
volumes:
- acme:/acme
- ./config.json:/etc/hysteria/config.json
- ./key/server.crt:/etc/hysteria/server.crt
- ./key/server.key:/etc/hysteria/server.key
command: ["server", "-c", "/etc/hysteria/config.json"]
volumes:
acme: