initial attempt at plugins
This commit is contained in:
17
plugins/00_dokku-standard/commands
Executable file
17
plugins/00_dokku-standard/commands
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -e; case "$1" in
|
||||
logs)
|
||||
CONTAINER=$(</home/git/$2/CONTAINER)
|
||||
docker logs $CONTAINER | tail -n 100
|
||||
;;
|
||||
|
||||
url)
|
||||
echo "http://$(< "/home/git/$2/HOSTNAME")"
|
||||
;;
|
||||
|
||||
test)
|
||||
echo "Hello"
|
||||
echo $2 $3 $4
|
||||
;;
|
||||
|
||||
esac
|
||||
5
plugins/00_dokku-standard/install
Executable file
5
plugins/00_dokku-standard/install
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
sed -i 's/docker -d/docker -d -r=true/' /etc/init/docker.conf
|
||||
|
||||
echo $HOSTNAME > /home/git/HOSTNAME
|
||||
2
plugins/WARNING
Normal file
2
plugins/WARNING
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
Please note that the hooks in Dokku are experimental and are likely to change quite a bit.
|
||||
18
plugins/nginx-vhosts/install
Executable file
18
plugins/nginx-vhosts/install
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
apt-get install -y nginx dnsutils
|
||||
|
||||
cat<<EOF > /etc/init/nginx-reloader.conf
|
||||
script
|
||||
echo | sudo -u git nc -l -U /home/git/reload-nginx && /etc/init.d/nginx reload
|
||||
end script
|
||||
respawn
|
||||
EOF
|
||||
|
||||
echo "include /home/git/*/nginx.conf;" > /etc/nginx/conf.d/dokku.conf
|
||||
|
||||
sed -i 's/# server_names_hash_bucket_size/server_names_hash_bucket_size/' /etc/nginx/nginx.conf
|
||||
|
||||
[[ $(dig +short $HOSTNAME) ]] && echo $HOSTNAME > /home/git/VHOST
|
||||
|
||||
/etc/init.d/nginx start
|
||||
start nginx-reloader
|
||||
Reference in New Issue
Block a user