Permalink
Browse files

Add services

  • Loading branch information...
eher-werkspot committed Jan 29, 2015
1 parent 72f68c6 commit e76f5370088553982fab938255e39c7ce1200a0b
Showing with 76 additions and 0 deletions.
  1. +13 −0 helena-discovery.service
  2. +12 −0 helena.service
  3. +13 −0 leitoranaholanda-discovery.service
  4. +12 −0 leitoranaholanda.service
  5. +11 −0 mysql.service
  6. +15 −0 nginx-lb@.service
View
@@ -0,0 +1,13 @@
[Unit]
Description=Announce Wordpress da Helena
BindsTo=helena.service
After=helena.service
[Service]
EnvironmentFile=/etc/environment
ExecStartPre=/usr/bin/etcdctl set /nginx-lb/server/helena/server_name 'www.helena.eher.com.br helena.eher.com.br'
ExecStart=/bin/sh -c "while true; do etcdctl set /nginx-lb/server/helena/upstream/main '${COREOS_PRIVATE_IPV4}:1001' --ttl 60;sleep 45;done"
ExecStop=/usr/bin/etcdctl rm --recursive /nginx-lb/server/helena
[X-Fleet]
MachineOf=helena.service
View
@@ -0,0 +1,12 @@
[Unit]
Description=Wordpress da Helena
After=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill helena
ExecStartPre=-/usr/bin/docker rm helena
ExecStartPre=/usr/bin/docker pull tutum/wordpress
ExecStart=/usr/bin/docker run --name helena -p 1001:80 -p 2001:3306 tutum/wordpress
ExecStop=/usr/bin/docker stop helena
@@ -0,0 +1,13 @@
[Unit]
Description=Announce Wordpress Leitora na Holanda
BindsTo=leitoranaholanda.service
After=leitoranaholanda.service
[Service]
EnvironmentFile=/etc/environment
ExecStartPre=/usr/bin/etcdctl set /nginx-lb/server/leitoranaholanda/server_name 'www.leitoranaholanda.com.br leitoranaholanda.com.br'
ExecStart=/bin/sh -c "while true; do etcdctl set /nginx-lb/server/leitoranaholanda/upstream/main '${COREOS_PRIVATE_IPV4}:1000' --ttl 60;sleep 45;done"
ExecStop=/usr/bin/etcdctl rm --recursive /nginx-lb/server/leitoranaholanda
[X-Fleet]
MachineOf=leitoranaholanda.service
View
@@ -0,0 +1,12 @@
[Unit]
Description=Wordpress Leitora na Holanda
After=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill leitoranaholanda
ExecStartPre=-/usr/bin/docker rm leitoranaholanda
ExecStartPre=/usr/bin/docker pull tutum/wordpress
ExecStart=/usr/bin/docker run --name leitoranaholanda -p 1000:80 -p 2000:3306 tutum/wordpress
ExecStop=/usr/bin/docker stop leitoranaholanda
View
@@ -0,0 +1,11 @@
[Unit]
Description=Mysql Server
After=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill mysql
ExecStartPre=-/usr/bin/docker rm mysql
ExecStartPre=/usr/bin/docker pull tutum/mysql
ExecStart=/usr/bin/docker run --name mysql -P tutum/mysql
ExecStop=/usr/bin/docker stop mysql
View
@@ -0,0 +1,15 @@
[Unit]
Description=Nginx Load Balancer
After=docker.service
[Service]
TimeoutStartSec=0
EnvironmentFile=/etc/environment
ExecStartPre=-/usr/bin/docker kill nginx-lb-%i
ExecStartPre=-/usr/bin/docker rm nginx-lb-%i
ExecStartPre=/usr/bin/docker pull eher/nginx-lb
ExecStart=/usr/bin/docker run --name nginx-lb-%i -p 80:80 -p 443:443 -e ETCD_IP=${COREOS_PRIVATE_IPV4} eher/nginx-lb
ExecStop=/usr/bin/docker stop nginx-lb-%i
[X-Fleet]
Conflicts=nginx-lb*

0 comments on commit e76f537

Please sign in to comment.