This commit is contained in:
Refactorian
2023-04-18 21:50:45 +09:00
committed by GitHub
parent 5f29134636
commit 4fe93734e4
91 changed files with 11957 additions and 1 deletions

1
.docker/db/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/data

7
.docker/db/my.cnf Normal file
View File

@@ -0,0 +1,7 @@
[mysqld]
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
default-authentication-plugin=mysql_native_password
[client]
default-character-set=utf8mb4

2
.docker/db/sql/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*
!.gitignore

View File

@@ -0,0 +1,28 @@
server {
listen 80;
index index.php index.html;
root /var/www/public;
client_max_body_size 100M; # 413 Request Entity Too Large
location / {
root /var/www/public;
index index.html index.php;
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_read_timeout 3600;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
send_timeout 3600;
proxy_connect_timeout 3600;
proxy_read_timeout 3600;
proxy_send_timeout 3600;
}
}

34
.docker/nginx/nginx.conf Normal file
View File

@@ -0,0 +1,34 @@
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
server_tokens off;
chunked_transfer_encoding off;
gzip on;
gzip_types application/json;
gzip_min_length 1000;
include /etc/nginx/conf.d/*.conf;
}

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'

45
.docker/php/Dockerfile Normal file
View File

@@ -0,0 +1,45 @@
FROM php:8.2-fpm
COPY php.ini /usr/local/etc/php/
COPY docker.conf /usr/local/etc/php-fpm.d/docker.conf
COPY .bashrc /root/
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
RUN apt-get install -y libicu-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl
# pcov
RUN pecl install pcov && docker-php-ext-enable pcov
# 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
RUN curl -sL https://deb.nodesource.com/setup_19.x | bash -
RUN apt-get install -y nodejs
RUN npm install npm@latest -g
RUN npm install yarn -g
#RUN npm install -g @vue/cli
WORKDIR /root
RUN git clone https://github.com/seebi/dircolors-solarized
# 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
EXPOSE 5173
WORKDIR /var/www
RUN composer global require "laravel/installer"

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

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

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