Skip to content
Permalink
Browse files

Improve deployment of nems-www on Docker

  • Loading branch information...
Cat5TV committed Aug 21, 2019
1 parent da93f23 commit 322e1f8a740398502164432eaeb8d53eb2d2f8cd
Showing with 13 additions and 4 deletions.
  1. +13 −4 build/001-nems-www
@@ -8,8 +8,17 @@ git clone https://github.com/Cat5TV/nems-www
useradd www-data
chown -R www-data:www-data nems-www

if [[ -d html ]]; then
rm -rf html
# Detect if the snapshot folder is mounted (which means this is Docker)
if [[ -e /var/www/html/backup/snapshots/ ]]; then
# Docker, so rsync instead of replace
apt-get update
apt-get install -y rsync
rsync -a nems-www/ html/
rm -rf nems-www
else
# All other platforms (not Docker)
if [[ -d html ]]; then
rm -rf html
fi
mv nems-www html
fi
mv nems-www html

0 comments on commit 322e1f8

Please sign in to comment.
You can’t perform that action at this time.