Skip to content

Instantly share code, notes, and snippets.

@tienthanh2509
Created October 26, 2017 15:12
Show Gist options
  • Save tienthanh2509/1fd5acddc3f55e1b53e109d33cf02671 to your computer and use it in GitHub Desktop.
Save tienthanh2509/1fd5acddc3f55e1b53e109d33cf02671 to your computer and use it in GitHub Desktop.
Systemd
[Unit]
Description=Traefik Proxy
After=network.target
[Service]
Type=forking
Restart=always
User=root
ExecStart=/opt/docker/start_web_proxy.sh &
[Install]
WantedBy=multi-user.target
@tienthanh2509
Copy link
Author

tienthanh2509 commented Oct 26, 2017

systemctl daemon-reload
systemctl status traefik.service
● traefik.service - Traefik Proxy
   Loaded: loaded (/etc/systemd/system/traefik.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2017-10-26 22:10:53 ICT; 55s ago
 Main PID: 27769 (start_web_proxy)
   CGroup: /system.slice/traefik.service
           ├─27769 /bin/bash /opt/docker/start_web_proxy.sh
           └─27772 traefik --configFile=/opt/docker/config/traefik/traefik.toml

Oct 26 22:10:54 elearning start_web_proxy.sh[27769]: time="2017-10-26T22:10:54+07:00" level=info msg="Server configuration reloaded on :80"
Oct 26 22:10:54 elearning start_web_proxy.sh[27769]: time="2017-10-26T22:10:54+07:00" level=info msg="Server configuration reloaded on :443"
Oct 26 22:10:56 elearning start_web_proxy.sh[27769]: time="2017-10-26T22:10:56+07:00" level=info msg="Server configuration reloaded on :80"
Oct 26 22:10:56 elearning start_web_proxy.sh[27769]: time="2017-10-26T22:10:56+07:00" level=info msg="Server configuration reloaded on :443"
Oct 26 22:11:10 elearning start_web_proxy.sh[27769]: time="2017-10-26T22:11:10+07:00" level=info msg="Skipping same configuration for provider docker"
Oct 26 22:11:25 elearning start_web_proxy.sh[27769]: time="2017-10-26T22:11:25+07:00" level=info msg="Skipping same configuration for provider docker"
Oct 26 22:11:40 elearning start_web_proxy.sh[27769]: time="2017-10-26T22:11:40+07:00" level=info msg="Skipping same configuration for provider docker"
Oct 26 22:11:41 elearning systemd[1]: Started Traefik Proxy.
Oct 26 22:11:44 elearning start_web_proxy.sh[27769]: 2017/10/26 22:11:44 h2_bundle.go:4292: http2: server: error reading preface from client 171.246.184.35:47030: timeo
Oct 26 22:11:44 elearning systemd[1]: Started Traefik Proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment