2015-06-02 12:47:33 +00:00
|
|
|
[Unit]
|
|
|
|
Description=resin-supervisor-dind
|
|
|
|
Requires=confd.service docker.service openvpn@client.service
|
|
|
|
After=confd.service
|
|
|
|
Before=openvpn@client.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
WorkingDirectory=/usr/src/app
|
|
|
|
EnvironmentFile=/usr/src/app/config/env
|
|
|
|
ExecStartPre=/usr/bin/docker pull ${SUPERVISOR_IMAGE}
|
|
|
|
ExecStartPre=-/usr/bin/docker kill resin_supervisor
|
|
|
|
ExecStartPre=-/usr/bin/docker rm resin_supervisor
|
|
|
|
ExecStartPre=-/bin/touch /etc/resolv.conf
|
|
|
|
ExecStart=/usr/bin/docker run --rm --privileged --name resin_supervisor \
|
|
|
|
--net=host \
|
|
|
|
-v /var/run/docker.sock:/run/docker.sock \
|
|
|
|
-v "${CONFIG_PATH}:/boot/config.json" \
|
|
|
|
-v /resin-data/resin-supervisor:/data \
|
|
|
|
-v /proc/net/fib_trie:/mnt/fib_trie \
|
|
|
|
-v /var/log/supervisor-log:/var/log \
|
|
|
|
-v /:/mnt/root \
|
2015-07-21 22:09:59 +00:00
|
|
|
-v /etc/resolv.conf:/etc/resolv.conf:rw \
|
2015-06-02 12:47:33 +00:00
|
|
|
-e "API_ENDPOINT=${API_ENDPOINT}" \
|
|
|
|
-e "REGISTRY_ENDPOINT=${REGISTRY_ENDPOINT}" \
|
|
|
|
-e "PUBNUB_SUBSCRIBE_KEY=${PUBNUB_SUBSCRIBE_KEY}" \
|
|
|
|
-e "PUBNUB_PUBLISH_KEY=${PUBNUB_PUBLISH_KEY}" \
|
|
|
|
-e "MIXPANEL_TOKEN=${MIXPANEL_TOKEN}" \
|
|
|
|
-e "LED_FILE=${LED_FILE}" \
|
|
|
|
-e "LISTEN_PORT=${LISTEN_PORT}" \
|
|
|
|
-e "SUPERVISOR_IMAGE=${SUPERVISOR_IMAGE}" \
|
2015-07-28 21:10:17 +00:00
|
|
|
-e "RESIN_SUPERVISOR_SECRET=${RESIN_SUPERVISOR_SECRET}" \
|
2015-06-02 12:47:33 +00:00
|
|
|
${SUPERVISOR_IMAGE}
|
|
|
|
TimeoutStartSec=0
|
|
|
|
Restart=always
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=basic.target
|