Skip to content

Commit

Permalink
Merge branch 'main' of gitlab.com:asaplabs/docker-php-nginx
Browse files Browse the repository at this point in the history
* 'main' of gitlab.com:asaplabs/docker-php-nginx:
  ⚡️ IMPROVE: update dockerfile config
  ⚡️ IMPROVE: remove windows platform on gh workflow
  ⚡️ IMPROVE: update dockerfile and config
  • Loading branch information
asapdotid committed Sep 10, 2024
2 parents aad8630 + cfac619 commit ac538b2
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .make/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ DOCKER_NAMESPACE=asapdotid
# Docker image name
DOCKER_IMAGE_NAME=php-nginx
# Docker image multiple platform
DOCKER_IMAGE_PLATFORM='linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8'
DOCKER_IMAGE_PLATFORM='linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8,windows/amd64'
17 changes: 10 additions & 7 deletions src/php/7.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,28 @@ ENV WEB_DOCUMENT_ROOT=${CONTAINER_WORKDIR_PATH} \
WEB_PHP_TIMEOUT=600 \
WEB_PHP_SOCKET=""
ENV WEB_PHP_SOCKET=127.0.0.1:9000
ENV SERVICE_NGINX_CLIENT_MAX_BODY_SIZE="80m"
ENV SERVICE_NGINX_CLIENT_MAX_BODY_SIZE="50m"
ENV TIMEZONE=Asia/Jakarta
ENV PHP_DATE_TIMEZONE=${TIMEZONE}
ENV APPLICATION_ENV=production
ENV SKIP_COMPOSER=false

# set timezone
RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone

# set php custom config
COPY src/php/7.4/conf/ /opt/docker/
COPY src/php/7.4/html/errors/ /var/www/errors/
COPY src/php/7.4/www/ $CONTAINER_WORKDIR_PATH/

# set timezone
RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone

# Install nginx
RUN set -x \
# Install nginx
&& apk-install \
nginx \
&& docker-run-bootstrap \
&& docker-image-cleanup
&& docker-run-bootstrap

# Expose Ports.
EXPOSE 80 443

# set workdir
WORKDIR $CONTAINER_WORKDIR_PATH
17 changes: 10 additions & 7 deletions src/php/8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,28 @@ ENV WEB_DOCUMENT_ROOT=${CONTAINER_WORKDIR_PATH} \
WEB_PHP_TIMEOUT=600 \
WEB_PHP_SOCKET=""
ENV WEB_PHP_SOCKET=127.0.0.1:9000
ENV SERVICE_NGINX_CLIENT_MAX_BODY_SIZE="80m"
ENV SERVICE_NGINX_CLIENT_MAX_BODY_SIZE="50m"
ENV TIMEZONE=Asia/Jakarta
ENV PHP_DATE_TIMEZONE=${TIMEZONE}
ENV APPLICATION_ENV=production
ENV SKIP_COMPOSER=false

# set timezone
RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone

# set php custom config
COPY src/php/8.1/conf/ /opt/docker/
COPY src/php/8.1/html/errors/ /var/www/errors/
COPY src/php/8.1/www/ $CONTAINER_WORKDIR_PATH/

# set timezone
RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone

# Install nginx
RUN set -x \
# Install nginx
&& apk-install \
nginx \
&& docker-run-bootstrap \
&& docker-image-cleanup
&& docker-run-bootstrap

# Expose Ports.
EXPOSE 80 443

# set workdir
WORKDIR $CONTAINER_WORKDIR_PATH
17 changes: 10 additions & 7 deletions src/php/8.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,28 @@ ENV WEB_DOCUMENT_ROOT=${CONTAINER_WORKDIR_PATH} \
WEB_PHP_TIMEOUT=600 \
WEB_PHP_SOCKET=""
ENV WEB_PHP_SOCKET=127.0.0.1:9000
ENV SERVICE_NGINX_CLIENT_MAX_BODY_SIZE="80m"
ENV SERVICE_NGINX_CLIENT_MAX_BODY_SIZE="50m"
ENV TIMEZONE=Asia/Jakarta
ENV PHP_DATE_TIMEZONE=${TIMEZONE}
ENV APPLICATION_ENV=production
ENV SKIP_COMPOSER=false

# set timezone
RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone

# set php custom config
COPY src/php/8.2/conf/ /opt/docker/
COPY src/php/8.2/html/errors/ /var/www/errors/
COPY src/php/8.2/www/ $CONTAINER_WORKDIR_PATH/

# set timezone
RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone

# Install nginx
RUN set -x \
# Install nginx
&& apk-install \
nginx \
&& docker-run-bootstrap \
&& docker-image-cleanup
&& docker-run-bootstrap

# Expose Ports.
EXPOSE 80 443

# set workdir
WORKDIR $CONTAINER_WORKDIR_PATH
17 changes: 10 additions & 7 deletions src/php/8.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,28 @@ ENV WEB_DOCUMENT_ROOT=${CONTAINER_WORKDIR_PATH} \
WEB_PHP_TIMEOUT=600 \
WEB_PHP_SOCKET=""
ENV WEB_PHP_SOCKET=127.0.0.1:9000
ENV SERVICE_NGINX_CLIENT_MAX_BODY_SIZE="80m"
ENV SERVICE_NGINX_CLIENT_MAX_BODY_SIZE="50m"
ENV TIMEZONE=Asia/Jakarta
ENV PHP_DATE_TIMEZONE=${TIMEZONE}
ENV APPLICATION_ENV=production
ENV SKIP_COMPOSER=false

# set timezone
RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone

# set php custom config
COPY src/php/8.3/conf/ /opt/docker/
COPY src/php/8.3/html/errors/ /var/www/errors/
COPY src/php/8.3/www/ $CONTAINER_WORKDIR_PATH/

# set timezone
RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone

# Install nginx
RUN set -x \
# Install nginx
&& apk-install \
nginx \
&& docker-run-bootstrap \
&& docker-image-cleanup
&& docker-run-bootstrap

# Expose Ports.
EXPOSE 80 443

# set workdir
WORKDIR $CONTAINER_WORKDIR_PATH

0 comments on commit ac538b2

Please sign in to comment.