Skip to content

Commit

Permalink
⚡️ IMPROVE: update dockerfile and config
Browse files Browse the repository at this point in the history
  • Loading branch information
asapdotid committed Aug 26, 2024
1 parent 8629251 commit 742dc4e
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 33 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-7.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- linux/arm/v7
- linux/arm/v8
- linux/arm64
- windows/amd64
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-8.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- linux/arm/v7
- linux/arm/v8
- linux/arm64
- windows/amd64
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-8.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- linux/arm/v7
- linux/arm/v8
- linux/arm64
- windows/amd64
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-8.3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- linux/arm/v7
- linux/arm/v8
- linux/arm64
- windows/amd64
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- linux/arm/v7
- linux/arm/v8
- linux/arm64
- windows/amd64
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
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'
19 changes: 11 additions & 8 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

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

# 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/

# Expose Ports.
EXPOSE 80 443

# set workdir
WORKDIR $CONTAINER_WORKDIR_PATH
19 changes: 11 additions & 8 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

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

# 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/

# Expose Ports.
EXPOSE 80 443

# set workdir
WORKDIR $CONTAINER_WORKDIR_PATH
19 changes: 11 additions & 8 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

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

# 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/

# Expose Ports.
EXPOSE 80 443

# set workdir
WORKDIR $CONTAINER_WORKDIR_PATH
19 changes: 11 additions & 8 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

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

# 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/

# Expose Ports.
EXPOSE 80 443

# set workdir
WORKDIR $CONTAINER_WORKDIR_PATH

0 comments on commit 742dc4e

Please sign in to comment.