Skip to content

Instantly share code, notes, and snippets.

@thenrich
Created January 22, 2015 20:57
Show Gist options
  • Save thenrich/c6c5f23a282dd9409cc5 to your computer and use it in GitHub Desktop.
Save thenrich/c6c5f23a282dd9409cc5 to your computer and use it in GitHub Desktop.
uWSGI systemd unit file
[Unit]
Description=uWSGI
After=docker.service
Requires=docker.service
[Service]
EnvironmentFile=/home/core/environ
User=core
TimeoutStartSec=300
ExecStartPre=-/usr/bin/docker kill uwsgi
ExecStartPre=-/usr/bin/docker rm -f uwsgi
ExecStartPre=/usr/bin/docker pull private_docker_repo:4000/uwsgi${DEPLOY_SUFFIX}
ExecStart=/usr/bin/docker run --name uwsgi private_docker_repo:4000/turret_io/uwsgi${DEPLOY_SUFFIX} /run.sh
ExecStop=/usr/bin/docker stop uwsgi
Restart=always
[X-Fleet]
Conflicts=uwsgi@*.service
MachineMetadata=subnet=10.0.0.0/24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment