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 }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build (dev)
- name: Build and push (dev)
uses: docker/build-push-action@v2
if: github.ref == 'refs/heads/dev'
with:
@ -70,7 +70,7 @@ jobs:
rm -rf /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
if: github.ref == 'refs/heads/master'
with:

View File

@ -52,7 +52,7 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build (dev)
- name: Build and push (dev)
uses: docker/build-push-action@v2
if: github.ref == 'refs/heads/dev'
with:
@ -70,7 +70,7 @@ jobs:
rm -rf /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
if: github.ref == 'refs/heads/master'
with:

View File

@ -55,7 +55,7 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build (dev)
- name: Build and push (dev)
uses: docker/build-push-action@v2
if: github.ref == 'refs/heads/dev'
with:
@ -72,7 +72,7 @@ jobs:
rm -rf /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
if: github.ref == 'refs/heads/master'
with:

View File

@ -6,7 +6,7 @@ chown -R root:nginx /www
chmod -R 770 /www
# prepare /opt
chown -R root:nginx /opt/bunkerized-nginx
chown -R root:nginx /opt
find /opt -type f -exec chmod 0740 {} \;
find /opt -type d -exec chmod 0750 {} \;
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
# prepare /etc/nginx
for file in $(ls /etc/nginx) ; do
if [ -f /etc/nginx/$file ] && [ ! -f /opt/confs/global/$file ] ; then
cp /etc/nginx/$file /opt/confs/global
fi
done
# TODO : remove commented code if not needed
#for file in $(ls /etc/nginx) ; do
# if [ -f /etc/nginx/$file ] && [ ! -f /opt/bunkerized-nginx/confs/global/$file ] ; then
# cp /etc/nginx/$file /opt/bunkerized-nginx/confs/global
# fi
#done
chown -R root:nginx /etc/nginx
chmod -R 770 /etc/nginx