Browse Source

Change permission for www

Lertsenem 5 years ago
parent
commit
33708db0d8
2 changed files with 3 additions and 4 deletions
  1. 1 2
      Dockerfile
  2. 2 2
      git.post-receive

+ 1 - 2
Dockerfile

@@ -24,7 +24,6 @@ RUN    apk update                              \
24 24
     && rm -rf /var/cache/apk/*                 \
25 25
     && adduser -h /srv/git                     \
26 26
                -s /bin/bash                    \
27
-               -G pelican                      \
28 27
                -G nginx                        \
29 28
                -D                              \
30 29
                pelican                         \
@@ -37,7 +36,7 @@ RUN    apk update                              \
37 36
     && ssh-keygen -A                           \
38 37
     && mkdir /srv/www                          \
39 38
     && chmod 775         /srv/www              \
40
-    && chown nginx:nginx /srv/www
39
+    && chown pelican:nginx /srv/www
41 40
 
42 41
 COPY run.sh                /run.sh
43 42
 COPY nginx.conf            /etc/nginx/nginx.conf

+ 2 - 2
git.post-receive

@@ -15,6 +15,6 @@ git checkout -f                    >/dev/null
15 15
 echo "Building pelican..."
16 16
 DEBUG=1 make publish
17 17
 
18
-rm -rf /srv/www
19
-cp -al output/ /srv/www >/dev/null 2>&1
18
+[ -e output ] && rm -rf /srv/www
19
+[ -e output ] && cp -al output/ /srv/www
20 20