-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(mysql): add timezone IT to mysql (cherry picked from commit 3032a0d) * chore: move docker configurations into service folder in .docker; move docker-compose.yml in .docker folder * upd: new .env template * fix: align env variable in docker-compose & paths * upd: add default taskfile * upd: add support multi environment * ref: move conf.d files into config * upd: add multi php version * fix: compatibility with docker-extension * upd: add php8 configuration * fix: rename executable file * chore: update README.md Co-authored-by: Kasui92 <Rododendro92>
- Loading branch information
Showing
19 changed files
with
461 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: "3.8" | ||
|
||
services: | ||
|
||
mailhog: | ||
build: | ||
context: "services/mailhog" | ||
image: "${PROJECT}_mailhog" | ||
container_name: "${PROJECT}_mailhog" | ||
#restart: always | ||
ports: | ||
- "${MAILHOG_PORT}:8025" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version: "3.8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# Create image based on the official PHP-FMP image | ||
FROM php:7.3-fpm | ||
|
||
# Arguments defined in docker-compose.yml | ||
ARG uid | ||
|
||
# Update the base libraries | ||
RUN apt-get -y update --fix-missing && apt-get upgrade -y | ||
|
||
# Install useful tools and install important libaries | ||
RUN apt-get -y --no-install-recommends install --fix-missing \ | ||
git nano wget dialog \ | ||
apt-utils build-essential \ | ||
zip openssl curl \ | ||
libmcrypt4 \ | ||
libfreetype6 \ | ||
libjpeg62-turbo \ | ||
libpng16-16 \ | ||
libxpm4 \ | ||
libsqlite3-dev \ | ||
libsqlite3-0 \ | ||
default-mysql-client \ | ||
libmcrypt-dev \ | ||
zlib1g-dev \ | ||
libzip-dev \ | ||
libicu-dev \ | ||
libpng-dev \ | ||
libjpeg-dev \ | ||
libfreetype6-dev \ | ||
libxpm-dev \ | ||
libvpx-dev \ | ||
libonig-dev \ | ||
libcurl3-dev \ | ||
libcurl3-openssl-dev \ | ||
libmemcached-dev \ | ||
zlib1g-dev | ||
|
||
# Other PHP5.6 Extensions | ||
RUN echo "Installing PHP extensions" && \ | ||
docker-php-ext-install pdo_mysql && \ | ||
docker-php-ext-install pdo_sqlite && \ | ||
docker-php-ext-install mysqli && \ | ||
docker-php-ext-install curl && \ | ||
docker-php-ext-install tokenizer && \ | ||
docker-php-ext-install json && \ | ||
docker-php-ext-install zip && \ | ||
docker-php-ext-install mbstring && \ | ||
docker-php-ext-install gettext && \ | ||
docker-php-ext-install opcache && \ | ||
docker-php-ext-configure gd --with-freetype-dir=/usr/include --with-jpeg-dir=/usr/include --with-png-dir=/usr/include && \ | ||
docker-php-ext-install gd | ||
|
||
# Other PHP5.6 Extensions | ||
RUN echo "Enabling PHP extensions" && \ | ||
docker-php-ext-enable pdo_mysql && \ | ||
docker-php-ext-enable pdo_sqlite && \ | ||
docker-php-ext-enable mysqli && \ | ||
docker-php-ext-enable zip | ||
|
||
# Install intl extension | ||
RUN echo "Install PHP Intl" \ | ||
&& docker-php-ext-configure intl \ | ||
&& docker-php-ext-install -j$(nproc) intl \ | ||
&& docker-php-ext-enable intl \ | ||
&& rm -rf /tmp/* | ||
|
||
# Install xdebug | ||
RUN echo "Install xDebug" \ | ||
&& pecl install xdebug-2.9.2 \ | ||
&& docker-php-ext-enable xdebug | ||
|
||
# Install redis | ||
RUN echo "Install Redis" \ | ||
&& pecl install redis-5.3.4 \ | ||
&& docker-php-ext-enable redis | ||
|
||
# Install sendmailer for Mailhog | ||
RUN curl --location --output /usr/local/bin/mhsendmail https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ | ||
&& chmod +x /usr/local/bin/mhsendmail | ||
|
||
# Clean up, try to reduce image size | ||
RUN apt-get remove -y libmcrypt-dev libicu-dev libpng-dev libjpeg-dev libfreetype6-dev libxpm-dev libvpx-dev gcc \ | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean all \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -rf /tmp/* | ||
|
||
|
||
# Add user for web application | ||
RUN groupadd -g $uid www | ||
RUN useradd -u $uid -ms /bin/bash -g www www | ||
|
||
# Copy existing application directory contents | ||
COPY . /var/www/html | ||
|
||
# Copy existing application directory permissions | ||
COPY --chown=www:www . /var/www/html | ||
|
||
# Change current user to www | ||
USER www | ||
|
||
# Expose port 9000 and start php-fpm server | ||
EXPOSE 9000 | ||
CMD ["php-fpm"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# Create image based on the official PHP-FMP image | ||
FROM php:8.0-fpm | ||
|
||
# Arguments defined in docker-compose.yml | ||
ARG uid | ||
|
||
# Update the base libraries | ||
RUN apt-get -y update --fix-missing && apt-get upgrade -y | ||
|
||
# Install useful tools and install important libaries | ||
RUN apt-get -y --no-install-recommends install --fix-missing \ | ||
git nano wget dialog \ | ||
apt-utils build-essential \ | ||
zip openssl curl \ | ||
libmcrypt4 \ | ||
libfreetype6 \ | ||
libjpeg62-turbo \ | ||
libpng16-16 \ | ||
libxpm4 \ | ||
libsqlite3-dev \ | ||
libsqlite3-0 \ | ||
default-mysql-client \ | ||
libmcrypt-dev \ | ||
zlib1g-dev \ | ||
libzip-dev \ | ||
libicu-dev \ | ||
libpng-dev \ | ||
libjpeg-dev \ | ||
libfreetype6-dev \ | ||
libwebp-dev \ | ||
libonig-dev \ | ||
libcurl3-dev \ | ||
libcurl3-openssl-dev \ | ||
libmemcached-dev \ | ||
zlib1g-dev | ||
|
||
# Other PHP5.6 Extensions | ||
RUN echo "Installing PHP extensions" && \ | ||
docker-php-ext-install pdo && \ | ||
docker-php-ext-install pdo_mysql && \ | ||
docker-php-ext-install mysqli && \ | ||
docker-php-ext-install curl && \ | ||
docker-php-ext-install tokenizer && \ | ||
docker-php-ext-install zip && \ | ||
docker-php-ext-install mbstring && \ | ||
docker-php-ext-install gettext && \ | ||
docker-php-ext-install opcache && \ | ||
docker-php-ext-configure \ | ||
# ref: https://github.com/docker-library/php/issues/920#issuecomment-562864296 | ||
gd --enable-gd --with-freetype --with-jpeg --with-webp && \ | ||
docker-php-ext-install gd | ||
|
||
# Other PHP5.6 Extensions | ||
RUN echo "Enabling PHP extensions" && \ | ||
docker-php-ext-enable pdo_mysql && \ | ||
docker-php-ext-enable pdo && \ | ||
docker-php-ext-enable mysqli && \ | ||
docker-php-ext-enable zip | ||
|
||
# Install intl extension | ||
RUN echo "Install PHP Intl" \ | ||
&& docker-php-ext-configure intl \ | ||
&& docker-php-ext-install -j$(nproc) intl \ | ||
&& docker-php-ext-enable intl \ | ||
&& rm -rf /tmp/* | ||
|
||
# Install xdebug | ||
RUN echo "Install xDebug" \ | ||
&& pecl install xdebug-3.1.5 \ | ||
&& docker-php-ext-enable xdebug | ||
|
||
# Install redis | ||
RUN echo "Install Redis" \ | ||
&& pecl install redis-5.3.4 \ | ||
&& docker-php-ext-enable redis | ||
|
||
# Install sendmailer for Mailhog | ||
RUN curl --location --output /usr/local/bin/mhsendmail https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ | ||
&& chmod +x /usr/local/bin/mhsendmail | ||
|
||
# Clean up, try to reduce image size | ||
RUN apt-get remove -y libmcrypt-dev libicu-dev libpng-dev libjpeg-dev libfreetype6-dev libxpm-dev libvpx-dev gcc \ | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean all \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -rf /tmp/* | ||
|
||
|
||
# Add user for web application | ||
RUN groupadd -g $uid www | ||
RUN useradd -u $uid -ms /bin/bash -g www www | ||
|
||
# Copy existing application directory contents | ||
COPY . /var/www/html | ||
|
||
# Copy existing application directory permissions | ||
COPY --chown=www:www . /var/www/html | ||
|
||
# Change current user to www | ||
USER www | ||
|
||
# Expose port 9000 and start php-fpm server | ||
EXPOSE 9000 | ||
CMD ["php-fpm"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.