forked from deas/wordpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
contentreich-web1.conf
46 lines (45 loc) · 1.44 KB
/
contentreich-web1.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# docker run -d -P \
# --name contentreich-web1 \
# --add-host=smtp:172.17.42.1 \
# -e "SMTP_DOMAIN=contentreich.de" \
# -e "WORDPRESS_HOME=http://brc.contentreich.de/" \
# -e "WORDPRESS_DB_USER=wp_scratch" \
# -e "WORDPRESS_DB_NAME=wp_scratch" \
# -e "WORDPRESS_DB_PASSWORD=wp_scratch" \
# -e "WORDPRESS_JETPACK_DEV_DEBUG=1" \
# -e "IMPORT_SRC=/usr/share/wordpress-import/" \
# -e "SERVICE_NAME=contentreich-web" \
# -e "SERVICE_TAGS=tag1,tag2"
# -e "SERVICE_REGION=mal-guggn" \
# -v /etc/localtime:/etc/localtime:ro \
# -v /run/systemd/journal/dev-log:/dev/log \
# -v /home/deas/tmp/wp-import/:/usr/share/wordpress-import:ro \
# deas/cr-wordpress
#
# Default key in etcd:
# "key": "/services/cr-wordpress/bruce:contentreich-www1:80"
# "key": "/services/contentreich-web/bruce:contentreich-www1:80"
description "Docker contentreich www container"
author "[email protected]"
start on (started etcd)
stop on runlevel [!2345]
respawn
script
/usr/bin/docker start -a $UPSTART_JOB
end script
post-stop script
/usr/bin/docker stop $UPSTART_JOB
end script
post-start script
MAX_CNT=10
CNT=0
while /usr/bin/docker inspect --format='{{.State.Running}}' $UPSTART_JOB | grep false >/dev/null && [ "$CNT" -lt $MAX_CNT ]
do
CNT=$((CNT+1))
sleep 1
done
if [ $CNT -eq $MAX_CNT ] ; then
echo fail
exit 1
fi
end script