Added gitea workflows
This commit is contained in:
parent
3bd6532e1b
commit
c022086e93
|
|
@ -0,0 +1,125 @@
|
||||||
|
name: Build and Push Alpine Image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build and push image
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Login to Docker Winter Access Git Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: docker.io
|
||||||
|
username: aprimediet
|
||||||
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
- name: Build and push 5.6 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=5
|
||||||
|
ALPINE_VERSION=3.5
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:5.6
|
||||||
|
aprimediet/php-fpm:5.6-alpine
|
||||||
|
- name: Build and push 7.2 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=7
|
||||||
|
ALPINE_VERSION=3.9
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:7.2
|
||||||
|
aprimediet/php-fpm:7.2-alpine
|
||||||
|
- name: Build and push 7.3 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=7
|
||||||
|
ALPINE_VERSION=3.10
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:7.3
|
||||||
|
aprimediet/php-fpm:7.3-alpine
|
||||||
|
- name: Build and push 7.4 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=7
|
||||||
|
ALPINE_VERSION=3.13
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:7.4
|
||||||
|
aprimediet/php-fpm:7.4-alpine
|
||||||
|
- name: Build and push 8.0 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=8
|
||||||
|
ALPINE_VERSION=3.16
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:8.0
|
||||||
|
aprimediet/php-fpm:8.0-alpine
|
||||||
|
- name: Build and push 8.1 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=81
|
||||||
|
ALPINE_VERSION=3.18
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:8.1
|
||||||
|
aprimediet/php-fpm:8.1-alpine
|
||||||
|
- name: Build and push 8.2 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=82
|
||||||
|
ALPINE_VERSION=3.18
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:8.2
|
||||||
|
aprimediet/php-fpm:8.2-alpine
|
||||||
|
- name: Build and push 8.3 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=83
|
||||||
|
ALPINE_VERSION=3.19
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:8.3-alpine
|
||||||
|
aprimediet/php-fpm:latest-alpine
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
name: Build and Push Alpine Image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build and push image
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Login to Docker Winter Access Git Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.winteraccess.id
|
||||||
|
username: aditya.prima
|
||||||
|
password: ${{ secrets.PATOKEN }}
|
||||||
|
- name: Build and push 5.6 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=5
|
||||||
|
ALPINE_VERSION=3.5
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:5.6
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:5.6-alpine
|
||||||
|
- name: Build and push 7.2 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=7
|
||||||
|
ALPINE_VERSION=3.9
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:7.2
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:7.2-alpine
|
||||||
|
- name: Build and push 7.3 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=7
|
||||||
|
ALPINE_VERSION=3.10
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:7.3
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:7.3-alpine
|
||||||
|
- name: Build and push 7.4 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=7
|
||||||
|
ALPINE_VERSION=3.13
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:7.4
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:7.4-alpine
|
||||||
|
- name: Build and push 8.0 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=8
|
||||||
|
ALPINE_VERSION=3.16
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.0
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.0-alpine
|
||||||
|
- name: Build and push 8.1 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=81
|
||||||
|
ALPINE_VERSION=3.18
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.1
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.1-alpine
|
||||||
|
- name: Build and push 8.2 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=82
|
||||||
|
ALPINE_VERSION=3.18
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.2
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.2-alpine
|
||||||
|
- name: Build and push 8.3 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.alpine
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=83
|
||||||
|
ALPINE_VERSION=3.19
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.3-alpine
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:latest-alpine
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
name: Build and Push Ubuntu Image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build and push image
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Login to Docker Winter Access Git Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: docker.io
|
||||||
|
username: aprimediet
|
||||||
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
- name: Build and push 5.6 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=5.6
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:5.6
|
||||||
|
aprimediet/php-fpm:5.6-ubuntu
|
||||||
|
- name: Build and push 7.2 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=7.2
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:7.2
|
||||||
|
aprimediet/php-fpm:7.2-ubuntu
|
||||||
|
- name: Build and push 7.3 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=7.3
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:7.3
|
||||||
|
aprimediet/php-fpm:7.3-ubuntu
|
||||||
|
- name: Build and push 7.4 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=7.4
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:7.4
|
||||||
|
aprimediet/php-fpm:7.4-ubuntu
|
||||||
|
- name: Build and push 8.0 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=8.0
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:8.0
|
||||||
|
aprimediet/php-fpm:8.0-ubuntu
|
||||||
|
- name: Build and push 8.1 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=8.1
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:8.1
|
||||||
|
aprimediet/php-fpm:8.1-ubuntu
|
||||||
|
- name: Build and push 8.2 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=8.2
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:8.2
|
||||||
|
aprimediet/php-fpm:8.2-ubuntu
|
||||||
|
- name: Build and push 8.3 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=8.3
|
||||||
|
REGISTRY_URL=aprimediet
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aprimediet/php-fpm:8.3
|
||||||
|
aprimediet/php-fpm:8.3-ubuntu
|
||||||
|
aprimediet/php-fpm:latest-ubuntu
|
||||||
|
aprimediet/php-fpm:latest
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
name: Build and Push Ubuntu Image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build and push image
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Login to Docker Winter Access Git Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.winteraccess.id
|
||||||
|
username: aditya.prima
|
||||||
|
password: ${{ secrets.PATOKEN }}
|
||||||
|
- name: Build and push 5.6 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=5.6
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:5.6
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:5.6-ubuntu
|
||||||
|
- name: Build and push 7.2 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=7.2
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:7.2
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:7.2-ubuntu
|
||||||
|
- name: Build and push 7.3 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=7.3
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:7.3
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:7.3-ubuntu
|
||||||
|
- name: Build and push 7.4 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=7.4
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:7.4
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:7.4-ubuntu
|
||||||
|
- name: Build and push 8.0 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=8.0
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.0
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.0-ubuntu
|
||||||
|
- name: Build and push 8.1 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=8.1
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.1
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.1-ubuntu
|
||||||
|
- name: Build and push 8.2 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=8.2
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.2
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.2-ubuntu
|
||||||
|
- name: Build and push 8.3 Images
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.ubuntu
|
||||||
|
build-args: |
|
||||||
|
PHP_VERSION=8.3
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.3
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:8.3-ubuntu
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:latest-ubuntu
|
||||||
|
git.winteraccess.id/${{ gitea.repository }}:latest
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
ARG REGISTRY_URL=git.winteraccess.id/docker
|
||||||
|
ARG PHP_VERSION=8.3
|
||||||
|
|
||||||
|
FROM ${REGISTRY_URL}/php:${PHP_VERSION}-alpine
|
||||||
|
LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com"
|
||||||
|
|
||||||
|
ENV PHP_FPM_BIN=php-fpm${PHP_VERSION}
|
||||||
|
|
||||||
|
WORKDIR /root
|
||||||
|
|
||||||
|
# INSTALL PHP APP
|
||||||
|
RUN --mount=type=cache,target=/var/cache/apk \
|
||||||
|
apk upgrade && apk add --update \
|
||||||
|
php${PHP_VERSION}-fpm
|
||||||
|
|
||||||
|
# REMOVE CURRENT POOL FIRST
|
||||||
|
RUN rm -rf /etc/php${PHP_VERSION}/php-fpm*
|
||||||
|
|
||||||
|
# COPY CONFIGURATION FILES
|
||||||
|
RUN mkdir -p /etc/php/fpm
|
||||||
|
ADD ./etc /etc
|
||||||
|
|
||||||
|
# COPY INIT SCRIPT
|
||||||
|
ADD ./scripts/php-fpm-init-alpine /usr/local/bin/php-fpm-init
|
||||||
|
RUN chmod +x /usr/local/bin/php-fpm-init
|
||||||
|
|
||||||
|
# CLEAN APK CACHES
|
||||||
|
RUN rm -vrf /var/cache/apk/*
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/local/bin/php-fpm-init"]
|
||||||
|
|
||||||
|
EXPOSE 9000
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
ARG PHP_VERSION=8.3
|
||||||
|
ARG REGISTRY_URL=git.winteraccess.id/docker
|
||||||
|
|
||||||
|
FROM ${REGISTRY_URL}/php:${PHP_VERSION}-ubuntu
|
||||||
|
LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com"
|
||||||
|
|
||||||
|
ENV PHP_FPM_BIN=php-fpm${PHP_VERSION}
|
||||||
|
|
||||||
|
# Set workdir at
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
|
# INSTALL BASE DEPENDENCIES
|
||||||
|
RUN --mount=type=cache,target=/var/cache/apt/archives \
|
||||||
|
apt -y update && apt -y upgrade && apt -y install \
|
||||||
|
php${PHP_VERSION}-fpm
|
||||||
|
|
||||||
|
# REMOVE DEFAULT PHP FPM
|
||||||
|
RUN rm -rf /etc/php/${PHP_VERSION}/fpm
|
||||||
|
|
||||||
|
# COPY CONFIGURATION FILES
|
||||||
|
ADD ./etc/php/fpm /etc/php/fpm
|
||||||
|
|
||||||
|
# COPY INIT SCRIPT
|
||||||
|
ADD ./scripts/php-fpm-init /usr/local/bin/php-fpm-init
|
||||||
|
RUN chmod +x /usr/local/bin/php-fpm-init
|
||||||
|
|
||||||
|
# CLEAN APT CACHE
|
||||||
|
RUN apt -y clean
|
||||||
|
|
||||||
|
# COPY INIT SCRIPT
|
||||||
|
ENTRYPOINT ["/usr/local/bin/php-fpm-init"]
|
||||||
|
|
||||||
|
EXPOSE 9000
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
; FPM Configuration ;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
;pid = /run/php/php5.6-fpm.pid
|
||||||
|
error_log = /proc/self/fd/2
|
||||||
|
log_level = warning
|
||||||
|
emergency_restart_threshold = 10
|
||||||
|
emergency_restart_interval = 1m
|
||||||
|
process_control_timeout = 10s
|
||||||
|
;process.max = 128
|
||||||
|
;process.priority = -19
|
||||||
|
;daemonize = yes
|
||||||
|
;rlimit_files = 1024
|
||||||
|
;rlimit_core = 0
|
||||||
|
;events.mechanism = epoll
|
||||||
|
|
||||||
|
include=/etc/php/fpm/pool.d/*.conf
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
[www]
|
||||||
|
|
||||||
|
;prefix = /path/to/pools/$pool
|
||||||
|
user = root
|
||||||
|
group = root
|
||||||
|
|
||||||
|
listen = 9000
|
||||||
|
listen.owner = root
|
||||||
|
listen.group = root
|
||||||
|
;listen.mode = 0660
|
||||||
|
;listen.acl_users =
|
||||||
|
;listen.acl_groups =
|
||||||
|
;listen.allowed_clients = 127.0.0.1
|
||||||
|
; process.priority = -19
|
||||||
|
;access.log = /proc/self/fd/2
|
||||||
|
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
|
||||||
|
;slowlog = log/$pool.log.slow
|
||||||
|
;request_slowlog_timeout = 0
|
||||||
|
;request_terminate_timeout = 0
|
||||||
|
;rlimit_files = 1024
|
||||||
|
;rlimit_core = 0
|
||||||
|
;chroot =
|
||||||
|
;chdir = /var/www
|
||||||
|
;catch_workers_output = yes
|
||||||
|
clear_env = no
|
||||||
|
;security.limit_extensions = .php .php3 .php4 .php5
|
||||||
|
|
||||||
|
;
|
||||||
|
; WORKER SETTINGS
|
||||||
|
; COPY AND ADJUST THIS FOR DIFFERENT SCENARIO
|
||||||
|
;
|
||||||
|
|
||||||
|
pm = dynamic
|
||||||
|
pm.max_children = 10
|
||||||
|
pm.start_servers = 5
|
||||||
|
pm.min_spare_servers = 5
|
||||||
|
pm.max_spare_servers = 5
|
||||||
|
pm.process_idle_timeout = 10s;
|
||||||
|
pm.max_requests = 500
|
||||||
|
;pm.status_path = /status
|
||||||
|
;ping.path = /ping
|
||||||
|
;ping.response = pong
|
||||||
|
|
||||||
|
;
|
||||||
|
; PHP.INI OVERRIDE
|
||||||
|
; COPY AND ADJUST THIS FOR DIFFERENT SCENARIO
|
||||||
|
;
|
||||||
|
|
||||||
|
php_admin_value[memory_limit] = 128M
|
||||||
|
php_admin_value[date.timezone] = Asia/Jakarta
|
||||||
|
php_value[upload_max_filesize]=256M
|
||||||
|
php_value[post_max_size]=256M
|
||||||
|
php_value[max_execution_time]=30
|
||||||
|
php_admin_value[output_buffering]=16384
|
||||||
|
php_value[session.save_path]="/var/lib/php/session"
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
echo "--------------------"
|
||||||
|
echo "Starting PHP FPM ${PHP_VERSION}"
|
||||||
|
echo "--------------------"
|
||||||
|
$PHP_FPM_BIN -F -O --allow-to-run-as-root -c /etc/php/${PHP_VERSION}/cli -y /etc/php/fpm/php-fpm.conf
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
echo "--------------------"
|
||||||
|
echo "Starting PHP FPM ${PHP_VERSION}"
|
||||||
|
echo "--------------------"
|
||||||
|
$PHP_FPM_BIN -F -O --allow-to-run-as-root -c /etc/php${PHP_VERSION} -y /etc/php/fpm/php-fpm.conf
|
||||||
Reference in New Issue