docker - fix permissions on /opt
This commit is contained in:
parent
37090dc66e
commit
e309ce6fd5
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
13
prepare.sh
13
prepare.sh
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue