docker - fix permissions on /opt

This commit is contained in:
bunkerity 2021-06-22 10:58:07 +02:00
parent 37090dc66e
commit e309ce6fd5
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
4 changed files with 13 additions and 12 deletions

View File

@ -52,7 +52,7 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }} password: ${{ secrets.DOCKER_TOKEN }}
- name: Build (dev) - name: Build and push (dev)
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
if: github.ref == 'refs/heads/dev' if: github.ref == 'refs/heads/dev'
with: with:
@ -70,7 +70,7 @@ jobs:
rm -rf /tmp/.buildx-cache rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Push (master) - name: Build and push (master)
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
with: with:

View File

@ -52,7 +52,7 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }} password: ${{ secrets.DOCKER_TOKEN }}
- name: Build (dev) - name: Build and push (dev)
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
if: github.ref == 'refs/heads/dev' if: github.ref == 'refs/heads/dev'
with: with:
@ -70,7 +70,7 @@ jobs:
rm -rf /tmp/.buildx-cache rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Push (master) - name: Build and push (master)
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
with: with:

View File

@ -55,7 +55,7 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }} password: ${{ secrets.DOCKER_TOKEN }}
- name: Build (dev) - name: Build and push (dev)
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
if: github.ref == 'refs/heads/dev' if: github.ref == 'refs/heads/dev'
with: with:
@ -72,7 +72,7 @@ jobs:
rm -rf /tmp/.buildx-cache rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Push (master) - name: Build and push (master)
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
with: with:

View File

@ -6,7 +6,7 @@ chown -R root:nginx /www
chmod -R 770 /www chmod -R 770 /www
# prepare /opt # prepare /opt
chown -R root:nginx /opt/bunkerized-nginx chown -R root:nginx /opt
find /opt -type f -exec chmod 0740 {} \; find /opt -type f -exec chmod 0740 {} \;
find /opt -type d -exec chmod 0750 {} \; find /opt -type d -exec chmod 0750 {} \;
chmod ugo+x /opt/bunkerized-nginx/entrypoint/* /opt/bunkerized-nginx/scripts/* chmod ugo+x /opt/bunkerized-nginx/entrypoint/* /opt/bunkerized-nginx/scripts/*
@ -15,11 +15,12 @@ chmod 770 /opt/bunkerized-nginx
chmod 440 /opt/bunkerized-nginx/settings.json chmod 440 /opt/bunkerized-nginx/settings.json
# prepare /etc/nginx # prepare /etc/nginx
for file in $(ls /etc/nginx) ; do # TODO : remove commented code if not needed
if [ -f /etc/nginx/$file ] && [ ! -f /opt/confs/global/$file ] ; then #for file in $(ls /etc/nginx) ; do
cp /etc/nginx/$file /opt/confs/global # if [ -f /etc/nginx/$file ] && [ ! -f /opt/bunkerized-nginx/confs/global/$file ] ; then
fi # cp /etc/nginx/$file /opt/bunkerized-nginx/confs/global
done # fi
#done
chown -R root:nginx /etc/nginx chown -R root:nginx /etc/nginx
chmod -R 770 /etc/nginx chmod -R 770 /etc/nginx