Compare commits
2 Commits
6ec02743da
...
21f3e27039
| Author | SHA1 | Date | |
|---|---|---|---|
|
21f3e27039
|
|||
|
092e9d552b
|
@@ -7,8 +7,8 @@ env:
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: "0 12 3 * *"
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -34,7 +34,8 @@ services:
|
||||
FPM_MAX_CHILDREN: 5 # default: 5
|
||||
FPM_START_SERVERS: 1 # default: 1
|
||||
FPM_MIN_SPARE_SERVERS: 1 # default: 1
|
||||
FPM_MAX_SPARE_SERVERS: 3 # default: 3
|
||||
FPM_MAX_SPARE_SERVERS: 3 # default: 3
|
||||
DISABLE_WEBROOT_CHOWN: 1 # default: 0
|
||||
```
|
||||
|
||||
The `/data/www` and `/data/logs` directories and their contents will be chowned to `$PUID:$PGID` and chmodded to `0755` for directories and `0644` for files at container start.
|
||||
|
||||
@@ -24,6 +24,8 @@ FPM_START_SERVERS=${FPM_START_SERVERS:-1}
|
||||
FPM_MIN_SPARE_SERVERS=${FPM_MIN_SPARE_SERVERS:-1}
|
||||
FPM_MAX_SPARE_SERVERS=${FPM_MAX_SPARE_SERVERS:-3}
|
||||
|
||||
DISABLE_WEBROOT_CHOWN=${DISABLE_WEBROOT_CHOWN:-0}
|
||||
|
||||
export USERNAME
|
||||
export GROUPNAME
|
||||
export PATH_BASE
|
||||
@@ -46,6 +48,8 @@ export FPM_START_SERVERS
|
||||
export FPM_MIN_SPARE_SERVERS
|
||||
export FPM_MAX_SPARE_SERVERS
|
||||
|
||||
export DISABLE_WEBROOT_CHOWN
|
||||
|
||||
# run all scripts in order
|
||||
run-parts /app/entrypoint.sh.d
|
||||
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "# chowning ${PATH_WEBROOT} to ${PUID}:${GROUPNAME}..."
|
||||
echo "# Started background chowning of ${PATH_WEBROOT} to ${USERNAME}:${GROUPNAME} (${PUID}:${PGID})..."
|
||||
|
||||
chown "${PUID}:${GROUPNAME}" "${PATH_WEBROOT}" -R
|
||||
if [ ${DISABLE_WEBROOT_CHOWN} -eq 1 ] ; then
|
||||
echo chowning skipped because of DISABLE_WEBROOT_CHOWN
|
||||
exit 0
|
||||
fi
|
||||
|
||||
chown "${USERNAME}:${GROUPNAME}" "${PATH_WEBROOT}" -R
|
||||
find "${PATH_WEBROOT}" -type d -exec chmod 0755 {} \; &
|
||||
find "${PATH_WEBROOT}" -type f -exec chmod 0644 {} \; &
|
||||
|
||||
Reference in New Issue
Block a user