24 lines
1017 B
Desktop File
24 lines
1017 B
Desktop File
[Unit]
|
|
Description=Hyapp robot-service container
|
|
Requires=docker.service
|
|
After=network-online.target docker.service
|
|
Wants=network-online.target
|
|
StartLimitIntervalSec=120
|
|
StartLimitBurst=3
|
|
|
|
[Service]
|
|
Type=simple
|
|
EnvironmentFile=/etc/hyapp/robot-service/docker.env
|
|
ExecStartPre=-/usr/bin/env docker rm -f ${CONTAINER_NAME}
|
|
ExecStart=/usr/bin/env docker run --name=${CONTAINER_NAME} --rm --network=host --init --pull=never --stop-signal=SIGTERM --stop-timeout=${STOP_TIMEOUT_SEC} --env=TZ=UTC --log-driver=json-file --log-opt=max-size=100m --log-opt=max-file=5 --mount=type=bind,src=${CONFIG_PATH},dst=/app/config.yaml,readonly --health-cmd="wget -q -O - http://127.0.0.1:13111/healthz/ready >/dev/null" --health-interval=5s --health-timeout=3s --health-retries=6 --health-start-period=10s ${IMAGE}
|
|
ExecStop=/usr/bin/env docker stop --time=${STOP_TIMEOUT_SEC} ${CONTAINER_NAME}
|
|
Restart=on-failure
|
|
RestartSec=5s
|
|
TimeoutStartSec=60
|
|
TimeoutStopSec=90
|
|
KillMode=none
|
|
LimitNOFILE=1048576
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|