Skip to content

Commit 6526307

Browse files
committed
⚡️ IMPROVE: update config
1 parent 8629251 commit 6526307

File tree

24 files changed

+76
-96
lines changed

24 files changed

+76
-96
lines changed

src/php/7.4/Dockerfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ ENV WEB_DOCUMENT_ROOT=${CONTAINER_WORKDIR_PATH} \
55
WEB_DOCUMENT_INDEX=index.php \
66
WEB_ALIAS_DOMAIN=*.local \
77
WEB_PHP_TIMEOUT=600 \
8-
WEB_PHP_SOCKET=""
9-
ENV WEB_PHP_SOCKET=127.0.0.1:9000
8+
WEB_PHP_SOCKET=127.0.0.1:9000
109
ENV SERVICE_NGINX_CLIENT_MAX_BODY_SIZE="80m"
1110
ENV TIMEZONE=Asia/Jakarta
1211
ENV PHP_DATE_TIMEZONE=${TIMEZONE}
@@ -21,11 +20,8 @@ COPY src/php/7.4/www/ $CONTAINER_WORKDIR_PATH/
2120
RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone
2221

2322
RUN set -x \
24-
# Install nginx
25-
&& apk-install \
26-
nginx \
27-
&& docker-run-bootstrap \
28-
&& docker-image-cleanup
23+
&& apk-install nginx \
24+
&& docker-run-bootstrap
2925

3026
EXPOSE 80 443
3127
WORKDIR $CONTAINER_WORKDIR_PATH

src/php/7.4/conf/bin/service.d/nginx.d/10-init.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env bash
2+
13
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
24
echo ""
35
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"

src/php/7.4/conf/provision/entrypoint.d/20-nginx.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env bash
2+
13
# Create tmp dir for nginx
24
mkdir -p /var/tmp/nginx/
35

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1+
#!/usr/bin/env bash
2+
13
# Composer install
24
if [ "$SKIP_COMPOSER" != true ]; then
35
# Try auto install for composer
46
if [ -f "$CONTAINER_WORKDIR_PATH/composer.json" ]; then
57
if [ "$APPLICATION_ENV" == "development" ]; then
6-
composer install --working-dir=$CONTAINER_WORKDIR_PATH
8+
composer install --working-dir="$CONTAINER_WORKDIR_PATH"
9+
# Fix rights of vendor directory
10+
chown -R "$APPLICATION_UID:$APPLICATION_GID" "$CONTAINER_WORKDIR_PATH/vendor"
11+
find "$CONTAINER_WORKDIR_PATH/vendor" -type d -exec chmod 755 {} \;
12+
find "$CONTAINER_WORKDIR_PATH/vendor" -type f -exec chmod 644 {} \;
713
else
8-
composer install --optimize-autoloader --no-interaction --no-progress --working-dir=$CONTAINER_WORKDIR_PATH
14+
composer install --optimize-autoloader --no-interaction --no-progress --working-dir="$CONTAINER_WORKDIR_PATH"
15+
# Fix rights of vendor directory
16+
chown -R "$APPLICATION_UID:$APPLICATION_GID" "$CONTAINER_WORKDIR_PATH/vendor"
17+
find "$CONTAINER_WORKDIR_PATH/vendor" -type d -exec chmod 755 {} \;
18+
find "$CONTAINER_WORKDIR_PATH/vendor" -type f -exec chmod 644 {} \;
919
fi
1020
fi
1121
fi

src/php/7.4/conf/service.d/nginx.d/10-init.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/php/7.4/conf/service.d/nginx.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/php/8.1/Dockerfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ ENV WEB_DOCUMENT_ROOT=${CONTAINER_WORKDIR_PATH} \
55
WEB_DOCUMENT_INDEX=index.php \
66
WEB_ALIAS_DOMAIN=*.local \
77
WEB_PHP_TIMEOUT=600 \
8-
WEB_PHP_SOCKET=""
9-
ENV WEB_PHP_SOCKET=127.0.0.1:9000
8+
WEB_PHP_SOCKET=127.0.0.1:9000
109
ENV SERVICE_NGINX_CLIENT_MAX_BODY_SIZE="80m"
1110
ENV TIMEZONE=Asia/Jakarta
1211
ENV PHP_DATE_TIMEZONE=${TIMEZONE}
@@ -21,11 +20,8 @@ COPY src/php/8.1/www/ $CONTAINER_WORKDIR_PATH/
2120
RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone
2221

2322
RUN set -x \
24-
# Install nginx
25-
&& apk-install \
26-
nginx \
27-
&& docker-run-bootstrap \
28-
&& docker-image-cleanup
23+
&& apk-install nginx \
24+
&& docker-run-bootstrap
2925

3026
EXPOSE 80 443
3127
WORKDIR $CONTAINER_WORKDIR_PATH

src/php/8.1/conf/bin/service.d/nginx.d/10-init.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env bash
2+
13
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
24
echo ""
35
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"

src/php/8.1/conf/provision/entrypoint.d/20-nginx.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env bash
2+
13
# Create tmp dir for nginx
24
mkdir -p /var/tmp/nginx/
35

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1+
#!/usr/bin/env bash
2+
13
# Composer install
24
if [ "$SKIP_COMPOSER" != true ]; then
35
# Try auto install for composer
46
if [ -f "$CONTAINER_WORKDIR_PATH/composer.json" ]; then
57
if [ "$APPLICATION_ENV" == "development" ]; then
6-
composer install --working-dir=$CONTAINER_WORKDIR_PATH
8+
composer install --working-dir="$CONTAINER_WORKDIR_PATH"
9+
# Fix rights of vendor directory
10+
chown -R "$APPLICATION_UID:$APPLICATION_GID" "$CONTAINER_WORKDIR_PATH/vendor"
11+
find "$CONTAINER_WORKDIR_PATH/vendor" -type d -exec chmod 755 {} \;
12+
find "$CONTAINER_WORKDIR_PATH/vendor" -type f -exec chmod 644 {} \;
713
else
8-
composer install --optimize-autoloader --no-interaction --no-progress --working-dir=$CONTAINER_WORKDIR_PATH
14+
composer install --optimize-autoloader --no-interaction --no-progress --working-dir="$CONTAINER_WORKDIR_PATH"
15+
# Fix rights of vendor directory
16+
chown -R "$APPLICATION_UID:$APPLICATION_GID" "$CONTAINER_WORKDIR_PATH/vendor"
17+
find "$CONTAINER_WORKDIR_PATH/vendor" -type d -exec chmod 755 {} \;
18+
find "$CONTAINER_WORKDIR_PATH/vendor" -type f -exec chmod 644 {} \;
919
fi
1020
fi
1121
fi

0 commit comments

Comments
 (0)