Newer
Older
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
47
48
49
50
51
52
53
54
55
static_domains=( domain1 domain2 )
wordpress_domains=( domain1 domain2 )
# START
cd /data/indiehosters
git pull
cp /data/indiehosters/unit-files/* /etc/systemd/system && sudo systemctl daemon-reload
docker pull pierreozoux/wordpress
for domain in "${static_domains[@]}"
do
folder=/data/domains/${domain}
echo "EMAIL=test@test.org" > ${folder}/.env
echo "APPLICATION=nginx" >> ${folder}/.env
echo DOCKER_ARGUMENTS="-v ${folder}/static/www-content:/app" >> ${folder}/.env
systemctl restart static@$domain
systemctl status static@$domain
systemctl status web@$domain
done
for domain in "${wordpress_domains[@]}"
do
folder=/data/domains/${domain}
echo "EMAIL=test@test.org" > ${folder}/.env
echo "APPLICATION=wordpress" >> ${folder}/.env
echo DOCKER_ARGUMENTS="--link mysql-${domain}:db \
-v /data/domains/${domain}/wordpress/data:/app/wp-content \
-v /data/domains/${domain}/wordpress/.htaccess:/app/.htaccess \
--env-file /data/domains/${domain}/wordpress/.env" >> ${folder}/.env
systemctl restart lamp@$domain
systemctl status lamp@$domain
systemctl status web@$domain
done
# STOP
# ROLLBACK START
cd /data/indiehosters
git checkout 65d6486005e3d96e3ad9d5ab17f99d8910cc5e70
cp /data/indiehosters/unit-files/* /etc/systemd/system && sudo systemctl daemon-reload
cd dockerfiles/services/wordpress/
docker build -t pierreozoux/wordpress .
for domain in "${wordpress_domains[@]}"
do
systemctl restart lamp@$domain
done
for domain in "${static_domains[@]}"
do
systemctl restart static@$domain
done
# ROLLBACK STOP
# CLEAN START
# CLEAN STOP