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.
16 lines
435 B
YAML
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:
|