mirror of
https://github.com/jkaninda/laravel-php-fpm.git
synced 2025-12-06 17:09:39 +01:00
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
@@ -22,13 +22,6 @@ jobs:
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push 7.4
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
file: "./src/docker/7.4/Dockerfile"
|
||||
push: true
|
||||
tags: "${{env.BUILDKIT_IMAGE}}:7.4"
|
||||
-
|
||||
name: Build and push 8.0
|
||||
uses: docker/build-push-action@v3
|
||||
@@ -42,6 +35,7 @@ jobs:
|
||||
with:
|
||||
file: "./src/docker/8.1/Dockerfile"
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: "${{env.BUILDKIT_IMAGE}}:8.1"
|
||||
-
|
||||
name: Build and push 8.2
|
||||
@@ -49,6 +43,16 @@ jobs:
|
||||
with:
|
||||
file: "./src/docker/8.2/Dockerfile"
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
"${{env.BUILDKIT_IMAGE}}:8.2"
|
||||
"${{env.BUILDKIT_IMAGE}}:latest"
|
||||
-
|
||||
name: Build and push 8.2 alpine
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
file: "./src/docker/8.2/Dockerfile.alpine"
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
"${{env.BUILDKIT_IMAGE}}:8.2-alpine"
|
||||
11
.github/workflows/manual.yaml
vendored
11
.github/workflows/manual.yaml
vendored
@@ -60,6 +60,7 @@ jobs:
|
||||
with:
|
||||
file: "./src/docker/8.1/Dockerfile"
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: "${{env.BUILDKIT_IMAGE}}:8.1"
|
||||
-
|
||||
name: Build and push 8.2
|
||||
@@ -67,6 +68,16 @@ jobs:
|
||||
with:
|
||||
file: "./src/docker/8.2/Dockerfile"
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
"${{env.BUILDKIT_IMAGE}}:8.2"
|
||||
"${{env.BUILDKIT_IMAGE}}:latest"
|
||||
-
|
||||
name: Build and push 8.2 alpine
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
file: "./src/docker/8.2/Dockerfile.alpine"
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
"${{env.BUILDKIT_IMAGE}}:8.2-alpine"
|
||||
4
build.sh
4
build.sh
@@ -8,10 +8,10 @@ fi
|
||||
if [ $tag != 'latest' ]
|
||||
then
|
||||
echo 'Build from from tag'
|
||||
docker build -f docker/${tag}/Dockerfile -t jkaninda/laravel-php-fpm:$tag .
|
||||
docker build -f src/docker/${tag}/Dockerfile -t jkaninda/laravel-php-fpm:$tag .
|
||||
else
|
||||
echo 'Build latest'
|
||||
docker build -f docker/8.2/Dockerfile -t jkaninda/laravel-php-fpm:$tag .
|
||||
docker build -f src/docker/8.2/Dockerfile -t jkaninda/laravel-php-fpm:$tag .
|
||||
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
version: '3'
|
||||
services:
|
||||
php-fpm:
|
||||
image: jkaninda/laravel-php-fpm:latest
|
||||
image: jkaninda/laravel-php-fpm:8.2
|
||||
container_name: php-fpm
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
#Project root
|
||||
- ./laravel:/var/www/html
|
||||
networks:
|
||||
- default #if you're using networks between containers
|
||||
- web #if you're using networks between containers
|
||||
#Nginx server
|
||||
nginx-server:
|
||||
image: jkaninda/nginx-fpm:alpine
|
||||
@@ -23,4 +23,7 @@ services:
|
||||
- CLIENT_MAX_BODY_SIZE=20M
|
||||
- PHP_FPM_HOST=php-fpm:9000
|
||||
networks:
|
||||
- default
|
||||
- web
|
||||
networks:
|
||||
web:
|
||||
external: false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM php:8.2.5-fpm
|
||||
FROM php:8.2.8-fpm
|
||||
ARG WORKDIR=/var/www/html
|
||||
ENV DOCUMENT_ROOT=${WORKDIR}
|
||||
ENV LARAVEL_PROCS_NUMBER=1
|
||||
|
||||
21
src/docker/8.2/Dockerfile.alpine
Normal file
21
src/docker/8.2/Dockerfile.alpine
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM php:8.2-fpm-alpine
|
||||
ARG WORKDIR=/var/www/html
|
||||
ENV DOCUMENT_ROOT=${WORKDIR}
|
||||
ENV LARAVEL_PROCS_NUMBER=1
|
||||
ARG HOST_UID=1000
|
||||
ENV USER=www-data
|
||||
|
||||
# Install the PHP pdo_mysql extention
|
||||
RUN docker-php-ext-install pdo_mysql
|
||||
|
||||
# Install Composer
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
# Set working directory
|
||||
WORKDIR $WORKDIR
|
||||
|
||||
RUN rm -Rf /var/www/* && \
|
||||
mkdir -p /var/www/html
|
||||
|
||||
ADD src/index.php $WORKDIR/index.php
|
||||
ADD src/php.ini $PHP_INI_DIR/conf.d/
|
||||
Reference in New Issue
Block a user