first commit

This commit is contained in:
dimon
2025-12-03 17:47:54 +00:00
commit 368ad0a220
100 changed files with 13791 additions and 0 deletions

BIN
.docker/php/._.bashrc Normal file

Binary file not shown.

BIN
.docker/php/._Dockerfile Normal file

Binary file not shown.

BIN
.docker/php/._docker.conf Normal file

Binary file not shown.

BIN
.docker/php/._entrypoint.sh Normal file

Binary file not shown.

BIN
.docker/php/._php.ini Normal file

Binary file not shown.

21
.docker/php/.bashrc Normal file
View File

@@ -0,0 +1,21 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
umask 022
# You may uncomment the following lines if you want `ls' to be colorized:
export SHELL
export LS_OPTIONS='--color=auto'
eval $(dircolors ~/dircolors-solarized/dircolors.256dark)
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias phpd='php -dzend_extension=xdebug.so -dxdebug.mode=debug -dxdebug.idekey=PHPSTORM -dxdebug.start_with_request=yes -dxdebug.client_host=host.docker.internal -dxdebug.client_port=9001'

66
.docker/php/Dockerfile Normal file
View File

@@ -0,0 +1,66 @@
FROM php:8.4-fpm
COPY php.ini /usr/local/etc/php/
COPY docker.conf /usr/local/etc/php-fpm.d/docker.conf
COPY .bashrc /root/
# Copy the entrypoint script
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
# mix
RUN apt-get update \
&& apt-get install -y build-essential zlib1g-dev default-mysql-client curl gnupg procps vim git unzip libzip-dev libpq-dev \
&& docker-php-ext-install zip pdo_mysql pdo_pgsql pgsql
# intl
RUN apt-get install -y libicu-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl
# gd
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev && \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ && \
docker-php-ext-install gd
# redis
RUN pecl install redis && docker-php-ext-enable redis
# pcov
RUN pecl install pcov && docker-php-ext-enable pcov
# pcntl
RUN docker-php-ext-install pcntl
# Xdebug
# RUN pecl install xdebug \
# && docker-php-ext-enable xdebug \
# && echo ";zend_extension=xdebug" > /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
# Node.js, NPM, Yarn
RUN curl -sL https://deb.nodesource.com/setup_22.x | bash -
RUN apt-get install -y nodejs
RUN npm install npm@latest -g
RUN npm install yarn -g
# Composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php
RUN php -r "unlink('composer-setup.php');"
RUN mv composer.phar /usr/local/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_HOME /composer
ENV PATH $PATH:/composer/vendor/bin
RUN composer config --global process-timeout 3600
RUN composer global require "laravel/installer"
WORKDIR /root
RUN git clone https://github.com/seebi/dircolors-solarized
EXPOSE 5173
WORKDIR /var/www
#entrypoint
ENTRYPOINT ["entrypoint.sh"]
CMD ["php-fpm"]

12
.docker/php/docker.conf Normal file
View File

@@ -0,0 +1,12 @@
[global]
error_log = /proc/self/fd/2
;request_terminate_timeout = 1h
[www]
; if we send this to /proc/self/fd/1, it never appears
access.log = /proc/self/fd/1
clear_env = no
; Ensure worker stdout and stderr are sent to the main error log.
catch_workers_output = yes

13
.docker/php/entrypoint.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
set -e
# Set permissions for Laravel directories
chown -R www-data:www-data /var/www/storage /var/www/bootstrap/cache
chmod -R 775 /var/www/storage /var/www/bootstrap/cache
# permissions for PHPMyAdmin
mkdir -p /sessions
chmod 777 /sessions
exec "$@"

7
.docker/php/php.ini Normal file
View File

@@ -0,0 +1,7 @@
; Example
; [Date]
; date.timezone = "Asia/Tokyo"
; [mbstring]
; mbstring.language = Japanese