docker-compose/description/compose.yaml

51 lines
1017 B
YAML
Raw Normal View History

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}