first commit
This commit is contained in:
BIN
.docker/._db
Executable file
BIN
.docker/._db
Executable file
Binary file not shown.
BIN
.docker/._logs
Executable file
BIN
.docker/._logs
Executable file
Binary file not shown.
BIN
.docker/._nginx
Executable file
BIN
.docker/._nginx
Executable file
Binary file not shown.
BIN
.docker/._php
Executable file
BIN
.docker/._php
Executable file
Binary file not shown.
BIN
.docker/._phpmyadmin
Executable file
BIN
.docker/._phpmyadmin
Executable file
Binary file not shown.
BIN
.docker/._redis
Executable file
BIN
.docker/._redis
Executable file
Binary file not shown.
BIN
.docker/db/._.gitignore
Normal file
BIN
.docker/db/._.gitignore
Normal file
Binary file not shown.
BIN
.docker/db/._my.cnf
Normal file
BIN
.docker/db/._my.cnf
Normal file
Binary file not shown.
BIN
.docker/db/._sql
Executable file
BIN
.docker/db/._sql
Executable file
Binary file not shown.
1
.docker/db/.gitignore
vendored
Normal file
1
.docker/db/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/data
|
||||
21
.docker/db/my.cnf
Normal file
21
.docker/db/my.cnf
Normal file
@@ -0,0 +1,21 @@
|
||||
[mysqld]
|
||||
character-set-server = utf8mb4
|
||||
collation-server = utf8mb4_bin
|
||||
|
||||
default-authentication-plugin = mysql_native_password
|
||||
|
||||
log-error = /var/log/mysql/mysql-error.log
|
||||
|
||||
slow_query_log = 1
|
||||
slow_query_log_file = /var/log/mysql/mysql-slow.log
|
||||
long_query_time = 5.0
|
||||
log_queries_not_using_indexes = 0
|
||||
|
||||
general_log = 1
|
||||
general_log_file = /var/log/mysql/mysql-query.log
|
||||
|
||||
[mysql]
|
||||
default-character-set = utf8mb4
|
||||
|
||||
[client]
|
||||
default-character-set = utf8mb4
|
||||
2
.docker/db/sql/.gitignore
vendored
Normal file
2
.docker/db/sql/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
2
.docker/logs/.gitignore
vendored
Normal file
2
.docker/logs/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
BIN
.docker/nginx/._default.conf
Normal file
BIN
.docker/nginx/._default.conf
Normal file
Binary file not shown.
BIN
.docker/nginx/._nginx.conf
Normal file
BIN
.docker/nginx/._nginx.conf
Normal file
Binary file not shown.
28
.docker/nginx/default.conf
Normal file
28
.docker/nginx/default.conf
Normal 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
34
.docker/nginx/nginx.conf
Normal 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;
|
||||
}
|
||||
BIN
.docker/php/._.bashrc
Normal file
BIN
.docker/php/._.bashrc
Normal file
Binary file not shown.
BIN
.docker/php/._Dockerfile
Normal file
BIN
.docker/php/._Dockerfile
Normal file
Binary file not shown.
BIN
.docker/php/._docker.conf
Normal file
BIN
.docker/php/._docker.conf
Normal file
Binary file not shown.
BIN
.docker/php/._entrypoint.sh
Normal file
BIN
.docker/php/._entrypoint.sh
Normal file
Binary file not shown.
BIN
.docker/php/._php.ini
Normal file
BIN
.docker/php/._php.ini
Normal file
Binary file not shown.
21
.docker/php/.bashrc
Normal file
21
.docker/php/.bashrc
Normal 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
66
.docker/php/Dockerfile
Normal 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
12
.docker/php/docker.conf
Normal 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
13
.docker/php/entrypoint.sh
Normal 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
7
.docker/php/php.ini
Normal file
@@ -0,0 +1,7 @@
|
||||
; Example
|
||||
|
||||
; [Date]
|
||||
; date.timezone = "Asia/Tokyo"
|
||||
|
||||
; [mbstring]
|
||||
; mbstring.language = Japanese
|
||||
2
.docker/phpmyadmin/.gitignore
vendored
Normal file
2
.docker/phpmyadmin/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
2
.docker/redis/.gitignore
vendored
Normal file
2
.docker/redis/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
Reference in New Issue
Block a user