docker - fix permissions on /opt
This commit is contained in:
parent
37090dc66e
commit
e309ce6fd5
@ -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:
|
||||||
|
|||||||
@ -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:
|
||||||
|
|||||||
4
.github/workflows/build-bunkerized-nginx.yml
vendored
4
.github/workflows/build-bunkerized-nginx.yml
vendored
@ -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:
|
||||||
|
|||||||
13
prepare.sh
13
prepare.sh
@ -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
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user