first commit
This commit is contained in:
@@ -3,15 +3,15 @@
|
|||||||
#=======================#
|
#=======================#
|
||||||
|
|
||||||
# options: [8.0,8.1,8.2,8.3,8.4,8.5]
|
# options: [8.0,8.1,8.2,8.3,8.4,8.5]
|
||||||
PHP_VERSION=8.2
|
PHP_VERSION=8.4
|
||||||
# options: [opencart,laravel,symfony]
|
# options: [laravel,symfony,magento2,wordpress,opencart]
|
||||||
FRAMEWORK=opencart
|
FRAMEWORK=opencart
|
||||||
# options: [local,prod,proxy]
|
# options: [local,prod,proxy]
|
||||||
MODE=proxy
|
MODE=proxy
|
||||||
PORT=80
|
PORT=80
|
||||||
# in case MODE is production set below server name {example.com}
|
# in case MODE is production set below server name {example.com}
|
||||||
# SERVER_NAME=
|
# SERVER_NAME=
|
||||||
|
PROJECT_NAME='opencart'
|
||||||
#=========================#
|
#=========================#
|
||||||
# Database Configurations #
|
# Database Configurations #
|
||||||
#=========================#
|
#=========================#
|
||||||
|
|||||||
+58
-18
@@ -1,41 +1,81 @@
|
|||||||
ARG PHP_VERSION
|
ARG PHP_VERSION
|
||||||
FROM dunglas/frankenphp:php${PHP_VERSION}-alpine
|
FROM dunglas/frankenphp:php${PHP_VERSION}-alpine AS base
|
||||||
|
|
||||||
# add additional extensions here:
|
# add additional extensions here:
|
||||||
RUN install-php-extensions \
|
RUN install-php-extensions \
|
||||||
pdo_mysql \
|
pdo_mysql \
|
||||||
mysqli \
|
|
||||||
gd \
|
|
||||||
imagick \
|
|
||||||
intl \
|
|
||||||
zip \
|
|
||||||
bcmath \
|
|
||||||
soap \
|
|
||||||
sqlite3 \
|
|
||||||
mbstring \
|
mbstring \
|
||||||
curl \
|
curl \
|
||||||
xml \
|
xml \
|
||||||
dom \
|
dom \
|
||||||
fileinfo \
|
fileinfo \
|
||||||
|
intl \
|
||||||
|
zip \
|
||||||
opcache \
|
opcache \
|
||||||
ctype \
|
ctype \
|
||||||
iconv \
|
iconv \
|
||||||
openssl \
|
openssl \
|
||||||
tokenizer \
|
tokenizer \
|
||||||
simplexml \
|
simplexml
|
||||||
xsl \
|
|
||||||
|
# -------------------------
|
||||||
|
# Node.js layer
|
||||||
|
# -------------------------
|
||||||
|
FROM base AS node
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y curl gnupg \
|
||||||
|
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||||
|
&& apt-get install -y nodejs \
|
||||||
|
&& node -v \
|
||||||
|
&& npm -v \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# Symfony profile
|
||||||
|
# -------------------------
|
||||||
|
FROM node AS symfony
|
||||||
|
RUN install-php-extensions \
|
||||||
|
apcu \
|
||||||
|
sodium
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# Laravel profile
|
||||||
|
# -------------------------
|
||||||
|
FROM node AS laravel
|
||||||
|
RUN install-php-extensions \
|
||||||
|
redis
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# WordPress profile
|
||||||
|
# -------------------------
|
||||||
|
FROM base AS wordpress
|
||||||
|
RUN install-php-extensions \
|
||||||
|
mysqli \
|
||||||
exif \
|
exif \
|
||||||
sodium \
|
imagick
|
||||||
redis \
|
|
||||||
apcu
|
# -------------------------
|
||||||
|
# Magento 2 profile
|
||||||
|
# -------------------------
|
||||||
|
FROM base AS magento2
|
||||||
|
RUN install-php-extensions \
|
||||||
|
mysqli \
|
||||||
|
xsl \
|
||||||
|
soap \
|
||||||
|
bcmath \
|
||||||
|
sodium
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# OpenCart profile
|
||||||
|
# -------------------------
|
||||||
|
FROM base AS opencart
|
||||||
|
RUN install-php-extensions \
|
||||||
|
mysqli
|
||||||
|
|
||||||
|
|
||||||
# Install Composer
|
# Install Composer
|
||||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
# Install Node.js
|
|
||||||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
|
||||||
&& apt-get install -y nodejs
|
|
||||||
|
|
||||||
# Fix permissions for storage & cache (FrankenPHP runs as UID 65534 = nobody)
|
# Fix permissions for storage & cache (FrankenPHP runs as UID 65534 = nobody)
|
||||||
RUN if [ -d /app/storage ]; then chown -R 65534:65534 /app/storage /app/bootstrap/cache; fi
|
RUN if [ -d /app/storage ]; then chown -R 65534:65534 /app/storage /app/bootstrap/cache; fi
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -3,11 +3,11 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
target: ${FRAMEWORK}
|
||||||
args:
|
args:
|
||||||
# args from .env file
|
# args from .env file
|
||||||
PHP_VERSION: ${PHP_VERSION}
|
PHP_VERSION: ${PHP_VERSION}
|
||||||
MODE: ${MODE}
|
MODE: ${MODE}
|
||||||
container_name: ${FRAMEWORK}${PHP_VERSION}
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
|
|||||||
Reference in New Issue
Block a user