新增说明及示例文件;更新README.md

This commit is contained in:
2023-12-15 16:17:51 +08:00
committed by huty
parent 55542ff806
commit 2e4d488295
14 changed files with 315 additions and 2 deletions

50
description/compose.yaml Normal file
View File

@@ -0,0 +1,50 @@
version: "3.9"
services:
${SERVICE_NAME}:
image: ${IMAGE_NAME}:${IMAGE_TAG}
container_name: ${CONTAINER_NAME}
restart: on-failure:3
privileged: true
user: ${USER_NAME}:${USER_GROUP}
working_dir: ${WORKING_DIR}
volumes:
- /etc/localtime:/etc/localtime:ro
- ${VOLUME_NAME}:${CONTAINER_PATH}
- ${HOST_PATH}:${CONTAINER_PATH}
configs:
- ${CONFIG_NAME}
secrets:
- ${SECRET_NAME}
environment:
- ${KEY}=${VALUE}
command: ${COMMAND}
depends_on:
- ${SERVICE_NAME}
network_mode: host
ports:
- ${HOST_PORT}:${CONTAINER_PORT}
networks:
- ${NETWORK_NAME}
volumes:
${VOLUME_NAME}:
external: true
name: ${VOLUME_NAME}
configs:
${CONFIG_NAME}:
external: true
name: ${CONFIG_NAME}
file: ${CONFIG_FILE_NAME}
secrets:
${SECRET_NAME}:
external: true
name: ${SECRET_NAME}
file: ${SECRET_FILE_NAME}
networks:
${NETWORK_NAME}:
external: true
name: ${NETWORK_NAME}