Compare commits
27 Commits
b1b2e1d501
...
uvicorn
Author | SHA1 | Date | |
---|---|---|---|
2695d1f759 | |||
3cb9b6e925 | |||
4e0c2dbfc4 | |||
3faf8a698a | |||
f3b9303754 | |||
0e1bd3246d | |||
184fc3dc2d | |||
2db44cb74e | |||
e17103f4ab | |||
e59e976cd9 | |||
33a0756530 | |||
5c1c94bfe2 | |||
46a0154871 | |||
25368c8408 | |||
c37ff438d8 | |||
b0cd920e41 | |||
dc3b0a76a7 | |||
35baceb62a | |||
f63747e59f | |||
1677ffe648 | |||
32b98ae170 | |||
5dcd3a131c | |||
a3f7465955 | |||
a244fec29a | |||
eb64cd702a | |||
fd7c8b9ac1 | |||
2049580005 |
12
.env.example
12
.env.example
@ -2,6 +2,13 @@
|
|||||||
DOCKER_HOST_IP=172.20.0.1
|
DOCKER_HOST_IP=172.20.0.1
|
||||||
PROJECTS_DIR=/home/youruser/PhpstormProjects
|
PROJECTS_DIR=/home/youruser/PhpstormProjects
|
||||||
|
|
||||||
|
# All options below dramastically need defined in docker-compose.*.yml
|
||||||
|
|
||||||
|
### PHP COMMON #############################################
|
||||||
|
INSTALL_REDIS=true
|
||||||
|
INSTALL_PEAR_MAIL=true
|
||||||
|
INSTALL_LIBREOFFICE=true
|
||||||
|
|
||||||
### WORKSPACE #############################################
|
### WORKSPACE #############################################
|
||||||
WORKSPACE_PUID=1000
|
WORKSPACE_PUID=1000
|
||||||
WORKSPACE_PGID=1000
|
WORKSPACE_PGID=1000
|
||||||
@ -15,9 +22,10 @@ WORKSPACE_NODE_VERSION=lts/hydrogen
|
|||||||
WORKSPACE_PHP_OPT_MAX_EXECUTION_TIME=0
|
WORKSPACE_PHP_OPT_MAX_EXECUTION_TIME=0
|
||||||
WORKSPACE_PHP_OPT_MEMORY_LIMIT=-1
|
WORKSPACE_PHP_OPT_MEMORY_LIMIT=-1
|
||||||
|
|
||||||
|
WORKSPACE_INSTALL_SUPERVISOR=false
|
||||||
|
WORKSPACE_INSTALL_PYTHON=false
|
||||||
|
|
||||||
### PHP-FPM #############################################
|
### PHP-FPM #############################################
|
||||||
INSTALL_REDIS=true
|
|
||||||
INSTALL_PEAR_MAIL=true
|
|
||||||
PHP_OPT_SHORT_OPEN_TAG=Off
|
PHP_OPT_SHORT_OPEN_TAG=Off
|
||||||
PHP_OPT_MAX_EXECUTION_TIME=600
|
PHP_OPT_MAX_EXECUTION_TIME=600
|
||||||
PHP_OPT_MEMORY_LIMIT=256M
|
PHP_OPT_MEMORY_LIMIT=256M
|
||||||
|
9
.gitignore
vendored
9
.gitignore
vendored
@ -1,6 +1,9 @@
|
|||||||
/.idea
|
/.idea
|
||||||
/dockerfiles/ypt-encoder
|
/dockerfiles/ypt-encoder
|
||||||
/docker-compose.yml
|
/docker-compose*
|
||||||
/docker-compose.elastic.yml
|
!/docker-compose.base.yml
|
||||||
|
!/docker-compose*.example
|
||||||
|
/docker-compose.nodejs.yml
|
||||||
/.env
|
/.env
|
||||||
/*.komodoproject
|
/*.komodoproject
|
||||||
|
/config/nginx/includes.d/auth.passwd
|
2
bash/change-hosts-on-windows.sh
Normal file
2
bash/change-hosts-on-windows.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
sed -i 's/.* host.docker.internal/127.0.0.1 host.docker.internal/' /c/Windows/System32/drivers/etc/hosts
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
|
||||||
|
|
||||||
. $DIR/bash/_docker-cmd.sh || {
|
. $SCRIPT_DIR/_docker-cmd.sh || {
|
||||||
echo "no docker cmd is presented" && exit 1
|
echo "no docker cmd is presented" && exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
|
||||||
|
|
||||||
. $DIR/bash/_docker-cmd.sh || {
|
. $SCRIPT_DIR/_docker-cmd.sh || {
|
||||||
echo "no docker cmd is presented" && exit 1
|
echo "no docker cmd is presented" && exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
|
||||||
|
|
||||||
. $DIR/bash/_docker-cmd.sh || {
|
. $SCRIPT_DIR/_docker-cmd.sh || {
|
||||||
echo "no docker cmd is presented" && exit 1
|
echo "no docker cmd is presented" && exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
bash/nginx-ssl-gen.sh
Normal file
6
bash/nginx-ssl-gen.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
||||||
|
|
||||||
|
cd ${DIR}/config/nginx/ssl.d && \
|
||||||
|
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj \
|
||||||
|
"/C=XX/ST=RU/L=RU/O=WPS/OU=Dev/CN=test"
|
22
bash/pm2-restart.sh
Executable file
22
bash/pm2-restart.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
||||||
|
|
||||||
|
. $DIR/bash/_docker-cmd.sh || {
|
||||||
|
echo "no docker cmd is presented" && exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
PM2_SERVICE=$1
|
||||||
|
|
||||||
|
if [[ -z "${PM2_SERVICE}" ]]; then
|
||||||
|
echo "Usage: $(basename $0) NODEJS_PROJECT_NAME"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
CONTAINER=$(docker ps | grep "pm2-${PM2_SERVICE}" | awk '{print $1}')
|
||||||
|
|
||||||
|
if [[ -z "${CONTAINER}" ]]; then
|
||||||
|
echo "Unable to find container: db"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
$DOCKER_CMD restart ${CONTAINER}
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
|
||||||
|
|
||||||
. $DIR/bash/_docker-cmd.sh || {
|
. $SCRIPT_DIR/_docker-cmd.sh || {
|
||||||
echo "no docker cmd is presented" && exit 1
|
echo "no docker cmd is presented" && exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
|
||||||
|
|
||||||
. $DIR/bash/_docker-cmd.sh || {
|
. $SCRIPT_DIR/_docker-cmd.sh || {
|
||||||
echo "no docker cmd is presented" && exit 1
|
echo "no docker cmd is presented" && exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# Not working on windows symlinks
|
||||||
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
||||||
|
|
||||||
GENERAL_LOG_FILE_PATH="${DIR}/log/mariadb/mariadb.log"
|
GENERAL_LOG_FILE_PATH="${DIR}/log/mariadb/mariadb.log"
|
||||||
|
9
bash/tail-nginx-access-log.sh
Executable file
9
bash/tail-nginx-access-log.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Not working on windows symlinks
|
||||||
|
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
||||||
|
|
||||||
|
LOG_FILE_PATH="${DIR}/log/nginx/access.log"
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
tail -f $LOG_FILE_PATH
|
9
bash/tail-nginx-error-log.sh
Executable file
9
bash/tail-nginx-error-log.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Not working on windows symlinks
|
||||||
|
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
||||||
|
|
||||||
|
LOG_FILE_PATH="${DIR}/log/nginx/error.log"
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
tail -f $LOG_FILE_PATH
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
|
||||||
|
|
||||||
. $DIR/bash/_docker-cmd.sh || {
|
. $SCRIPT_DIR/_docker-cmd.sh || {
|
||||||
echo "no docker cmd is presented" && exit 1
|
echo "no docker cmd is presented" && exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# Not working on windows symlinks
|
||||||
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
||||||
|
|
||||||
PHP_VERSION=$1 # Without dot
|
PHP_VERSION=$1 # Without dot
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# Not working on windows symlinks
|
||||||
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
||||||
|
|
||||||
PHP_VERSION=$1 # Without dot
|
PHP_VERSION=$1 # Without dot
|
||||||
@ -8,9 +9,19 @@ if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=81; fi
|
|||||||
|
|
||||||
POSSIBLE_XDEBUG_VERSION=xdebug2
|
POSSIBLE_XDEBUG_VERSION=xdebug2
|
||||||
|
|
||||||
|
echo "Choice PHP_VERSION: $PHP_VERSION"
|
||||||
|
|
||||||
if [[ $PHP_VERSION -ge 81 ]]; then
|
if [[ $PHP_VERSION -ge 81 ]]; then
|
||||||
POSSIBLE_XDEBUG_VERSION=xdebug3
|
POSSIBLE_XDEBUG_VERSION=xdebug3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Choice POSSIBLE_XDEBUG_VERSION: $POSSIBLE_XDEBUG_VERSION"
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
||||||
${DIR}/dockerfiles/php-fpm/${POSSIBLE_XDEBUG_VERSION}/xdebug.sh start ${PHP_VERSION} ${WITH_PROFILER}
|
${DIR}/dockerfiles/php-fpm/${POSSIBLE_XDEBUG_VERSION}/xdebug.sh start ${PHP_VERSION} ${WITH_PROFILER}
|
||||||
|
|
||||||
|
echo
|
||||||
${DIR}/dockerfiles/workspace/xdebug.sh start ${PHP_VERSION} ${WITH_PROFILER}
|
${DIR}/dockerfiles/workspace/xdebug.sh start ${PHP_VERSION} ${WITH_PROFILER}
|
||||||
|
|
||||||
|
echo
|
3
config/dnsmasq/.gitignore
vendored
Normal file
3
config/dnsmasq/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
|
!.example
|
9
config/dnsmasq/dnsmasq.conf.example
Normal file
9
config/dnsmasq/dnsmasq.conf.example
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#log all dns queries
|
||||||
|
log-queries
|
||||||
|
#dont use hosts nameservers
|
||||||
|
no-resolv
|
||||||
|
#use google as default nameservers
|
||||||
|
server=8.8.4.4
|
||||||
|
server=8.8.8.8
|
||||||
|
#explicitly define host-ip mappings
|
||||||
|
address=/domain/ip
|
3
config/mariadb/90-mysqld.cnf.example
Normal file
3
config/mariadb/90-mysqld.cnf.example
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[mysqld]
|
||||||
|
explicit_defaults_for_timestamp = ON
|
||||||
|
default_time_zone = '+03:00'
|
3
config/mariadb/root-account.cnf.example
Normal file
3
config/mariadb/root-account.cnf.example
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[client]
|
||||||
|
user = root
|
||||||
|
password = 123456
|
@ -21,7 +21,7 @@ map $http_accept $webp_suffix {
|
|||||||
"~*webp" ".webp";
|
"~*webp" ".webp";
|
||||||
}
|
}
|
||||||
|
|
||||||
resolver 8.8.8.8;
|
resolver 127.0.0.11;
|
||||||
|
|
||||||
map $http_host $uploads_upstream {
|
map $http_host $uploads_upstream {
|
||||||
wordpress.local.wpstudio.ru "https://somewp.site";
|
wordpress.local.wpstudio.ru "https://somewp.site";
|
||||||
@ -35,6 +35,7 @@ server {
|
|||||||
include includes.d/octobercms.conf;
|
include includes.d/octobercms.conf;
|
||||||
include includes.d/staticfiles.conf;
|
include includes.d/staticfiles.conf;
|
||||||
client_max_body_size 300M;
|
client_max_body_size 300M;
|
||||||
|
large_client_header_buffers 4 32k;
|
||||||
location ~ ^/index.php {
|
location ~ ^/index.php {
|
||||||
fastcgi_pass php81;
|
fastcgi_pass php81;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
|
18
config/nginx/conf.d/z-directus.conf.example
Normal file
18
config/nginx/conf.d/z-directus.conf.example
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
map $http_host $directus {
|
||||||
|
directus-mi.local.wpstudio.ru directus-mi;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name
|
||||||
|
directus-mi.local.wpstudio.ru
|
||||||
|
;
|
||||||
|
location / {
|
||||||
|
resolver 127.0.0.11;
|
||||||
|
proxy_pass http://$directus:8055;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
}
|
||||||
|
}
|
23
config/nginx/conf.d/z-nodejs.conf.example
Normal file
23
config/nginx/conf.d/z-nodejs.conf.example
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
map $http_host $pm2 {
|
||||||
|
someprojectone.build.local.wpstudio.ru pm2-someprojectone;
|
||||||
|
someprojecttwo.build.local.wpstudio.ru pm2-someprojecttwo;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name
|
||||||
|
someprojectone.build.local.wpstudio.ru
|
||||||
|
someprojecttwo.build.local.wpstudio.ru
|
||||||
|
;
|
||||||
|
location / {
|
||||||
|
resolver 127.0.0.11;
|
||||||
|
proxy_pass http://$pm2:3000;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
proxy_buffer_size 16k;
|
||||||
|
proxy_buffers 8 16k;
|
||||||
|
proxy_busy_buffers_size 32k;
|
||||||
|
}
|
||||||
|
}
|
14
config/nginx/conf.d/z-pma.conf.example
Normal file
14
config/nginx/conf.d/z-pma.conf.example
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
server {
|
||||||
|
server_name pma.e2e.10ballov.ru;
|
||||||
|
listen 80;
|
||||||
|
include includes.d/auth.conf;
|
||||||
|
client_max_body_size 300M;
|
||||||
|
location / {
|
||||||
|
#resolver 127.0.0.11;
|
||||||
|
proxy_pass http://pma;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
}
|
||||||
|
}
|
32
config/nginx/conf.d/z-python.conf.example
Normal file
32
config/nginx/conf.d/z-python.conf.example
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
map $http_host $python_upstream {
|
||||||
|
someproject.local.wpstudio.ru http://workspace74:8000;
|
||||||
|
}
|
||||||
|
|
||||||
|
map $http_host $python_root {
|
||||||
|
someproject.local.wpstudio.ru /usr/share/nginx/python/someproject;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name
|
||||||
|
someproject.local.wpstudio.ru
|
||||||
|
;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
resolver 127.0.0.11;
|
||||||
|
proxy_pass $python_upstream;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
}
|
||||||
|
|
||||||
|
root $python_root;
|
||||||
|
|
||||||
|
location ~ /media {
|
||||||
|
expires max;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /static {
|
||||||
|
expires max;
|
||||||
|
}
|
||||||
|
}
|
@ -25,6 +25,7 @@ server {
|
|||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
||||||
|
fastcgi_param SERVER_NAME $host;
|
||||||
|
|
||||||
fastcgi_pass php74;
|
fastcgi_pass php74;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
@ -55,6 +56,7 @@ server {
|
|||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
||||||
|
fastcgi_param SERVER_NAME $host;
|
||||||
|
|
||||||
fastcgi_pass php74;
|
fastcgi_pass php74;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
|
5
config/nginx/includes.d/auth.conf
Normal file
5
config/nginx/includes.d/auth.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
set $auth_basic Restricted;
|
||||||
|
auth_basic $auth_basic;
|
||||||
|
auth_basic_user_file includes.d/auth.passwd;
|
||||||
|
# Use openssl for generate basic password
|
||||||
|
# echo "MYUSER:$(openssl passwd -apr1 PASSWORD)" > auth.passwd
|
14
config/nginx/includes.d/https.conf
Normal file
14
config/nginx/includes.d/https.conf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
error_page 419 = @https;
|
||||||
|
set $is_https "0";
|
||||||
|
if ( $scheme ~* "^https") {
|
||||||
|
set $is_https "${is_https}1";
|
||||||
|
}
|
||||||
|
if ( $request_uri ~* "api/v") {
|
||||||
|
set $is_https "${is_https}1";
|
||||||
|
}
|
||||||
|
if ( $is_https = "0" ) {
|
||||||
|
return 419;
|
||||||
|
}
|
||||||
|
location @https {
|
||||||
|
rewrite ^ https://$http_host$request_uri permanent;
|
||||||
|
}
|
@ -1,47 +1,56 @@
|
|||||||
|
location / {
|
||||||
|
rewrite ^/.*$ /index.php last;
|
||||||
|
}
|
||||||
|
location ~ ^/combine.*\.(css|js) {
|
||||||
|
rewrite ^/.*$ /index.php last;
|
||||||
|
expires max;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
# Whitelist
|
||||||
rewrite ^/.*$ /index.php last;
|
|
||||||
}
|
|
||||||
location ~ ^/combine.*\.(css|js) {
|
|
||||||
rewrite ^/.*$ /index.php last;
|
|
||||||
expires max;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Whitelist
|
## Let October handle if static file not exists
|
||||||
## Let October handle if static file not exists
|
|
||||||
location = /favicon.ico { try_files $uri /index.php; }
|
|
||||||
location ~ ^/.*\.xml { try_files $uri /index.php; }
|
|
||||||
location = /robots.txt { try_files $uri /index.php; }
|
|
||||||
location = /humans.txt { try_files $uri /index.php; }
|
|
||||||
|
|
||||||
## Let nginx return 404 if static file not exists
|
location = /favicon.ico { try_files $uri /index.php; }
|
||||||
location /storage/app/uploads/public { try_files $uri /404; }
|
location ~ ^/.*\.xml { try_files $uri /index.php; }
|
||||||
location /storage/app/media { try_files $uri /404; }
|
location = /robots.txt { try_files $uri /index.php; }
|
||||||
location /storage/app/yml { try_files $uri /404; }
|
location = /humans.txt { try_files $uri /index.php; }
|
||||||
location /storage/app/docx { try_files $uri /404; }
|
|
||||||
location /storage/app/resized { try_files $uri /404; }
|
|
||||||
location /storage/temp/public { try_files $uri /404; }
|
|
||||||
|
|
||||||
location ~ ^/modules/.*/assets { try_files $uri /404; }
|
## Let nginx return 404 if static file not exists
|
||||||
location ~ ^/modules/.*/resources { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/behaviors/.*/assets { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/behaviors/.*/resources { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/widgets/.*/assets { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/widgets/.*/resources { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/formwidgets/.*/assets { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/formwidgets/.*/resources { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/reportwidgets/.*/assets { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/reportwidgets/.*/resources { try_files $uri /404; }
|
|
||||||
|
|
||||||
location ~ ^/plugins/.*/.*/assets { try_files $uri /404; }
|
location /storage/app/uploads/public {
|
||||||
location ~ ^/plugins/.*/.*/resources { try_files $uri /404; }
|
# add proxy cors headers
|
||||||
location ~ ^/plugins/.*/.*/behaviors/.*/assets { try_files $uri /404; }
|
add_header Access-Control-Allow-Headers "*" always;
|
||||||
location ~ ^/plugins/.*/.*/behaviors/.*/resources { try_files $uri /404; }
|
add_header Access-Control-Allow-Methods "*" always;
|
||||||
location ~ ^/plugins/.*/.*/reportwidgets/.*/assets { try_files $uri /404; }
|
add_header Access-Control-Allow-Origin "*" always;
|
||||||
location ~ ^/plugins/.*/.*/reportwidgets/.*/resources { try_files $uri /404; }
|
try_files $uri /404;
|
||||||
location ~ ^/plugins/.*/.*/formwidgets/.*/assets { try_files $uri /404; }
|
}
|
||||||
location ~ ^/plugins/.*/.*/formwidgets/.*/resources { try_files $uri /404; }
|
|
||||||
location ~ ^/plugins/.*/.*/widgets/.*/assets { try_files $uri /404; }
|
|
||||||
location ~ ^/plugins/.*/.*/widgets/.*/resources { try_files $uri /404; }
|
|
||||||
|
|
||||||
location ~ ^/themes/.*/resources { try_files $uri /404; }
|
location /storage/app/media { try_files $uri /404; }
|
||||||
|
location /storage/app/yml { try_files $uri /404; }
|
||||||
|
location /storage/app/docx { try_files $uri /404; }
|
||||||
|
location /storage/app/resized { try_files $uri /404; }
|
||||||
|
location /storage/temp/public { try_files $uri /404; }
|
||||||
|
|
||||||
|
location ~ ^/modules/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/behaviors/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/behaviors/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/widgets/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/widgets/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/formwidgets/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/formwidgets/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/reportwidgets/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/reportwidgets/.*/resources { try_files $uri /404; }
|
||||||
|
|
||||||
|
location ~ ^/plugins/.*/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/behaviors/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/behaviors/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/reportwidgets/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/reportwidgets/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/formwidgets/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/formwidgets/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/widgets/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/widgets/.*/resources { try_files $uri /404; }
|
||||||
|
|
||||||
|
location ~ ^/themes/.*/resources { try_files $uri /404; }
|
||||||
|
2
config/nginx/ssl.d/.gitignore
vendored
Normal file
2
config/nginx/ssl.d/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
3
config/supervisor/.gitignore
vendored
Normal file
3
config/supervisor/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
*
|
||||||
|
!*.example
|
||||||
|
!.gitignore
|
9
config/supervisor/uvicorn.conf.example
Normal file
9
config/supervisor/uvicorn.conf.example
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[fcgi-program:uvicorn]
|
||||||
|
process_name=uvicorn-tourtennis-%(process_num)d
|
||||||
|
socket=tcp://localhost:8000
|
||||||
|
command=/var/python/tourtennis/.venv/bin/uvicorn --fd 0 main:App
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
numprocs=1
|
||||||
|
user=laradock
|
||||||
|
redirect_stderr=true
|
@ -1,5 +1,3 @@
|
|||||||
version: '3.6'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx
|
image: nginx
|
||||||
@ -8,15 +6,18 @@ services:
|
|||||||
- ${PROJECTS_DIR}:/usr/share/nginx/html
|
- ${PROJECTS_DIR}:/usr/share/nginx/html
|
||||||
- ./config/nginx/conf.d:/etc/nginx/conf.d
|
- ./config/nginx/conf.d:/etc/nginx/conf.d
|
||||||
- ./config/nginx/includes.d:/etc/nginx/includes.d
|
- ./config/nginx/includes.d:/etc/nginx/includes.d
|
||||||
|
- ./config/nginx/ssl.d:/etc/nginx/ssl.d
|
||||||
- ./log/nginx:/var/log/nginx
|
- ./log/nginx:/var/log/nginx
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
php:
|
php:
|
||||||
build:
|
build:
|
||||||
context: ./dockerfiles/php-fpm
|
context: ./dockerfiles/php-fpm
|
||||||
args:
|
args:
|
||||||
- INSTALL_REDIS=${INSTALL_REDIS}
|
- INSTALL_REDIS=${INSTALL_REDIS}
|
||||||
- INSTALL_PEAR_MAIL=${INSTALL_PEAR_MAIL}
|
- INSTALL_PEAR_MAIL=${INSTALL_PEAR_MAIL}
|
||||||
|
- INSTALL_LIBREOFFICE=${INSTALL_LIBREOFFICE}
|
||||||
- PHP_OPT_SHORT_OPEN_TAG=${PHP_OPT_SHORT_OPEN_TAG}
|
- PHP_OPT_SHORT_OPEN_TAG=${PHP_OPT_SHORT_OPEN_TAG}
|
||||||
- PHP_OPT_MAX_EXECUTION_TIME=${PHP_OPT_MAX_EXECUTION_TIME}
|
- PHP_OPT_MAX_EXECUTION_TIME=${PHP_OPT_MAX_EXECUTION_TIME}
|
||||||
- PHP_OPT_MEMORY_LIMIT=${PHP_OPT_MEMORY_LIMIT}
|
- PHP_OPT_MEMORY_LIMIT=${PHP_OPT_MEMORY_LIMIT}
|
||||||
@ -30,15 +31,21 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./dockerfiles/workspace
|
context: ./dockerfiles/workspace
|
||||||
args:
|
args:
|
||||||
|
- INSTALL_REDIS=${INSTALL_REDIS}
|
||||||
|
- INSTALL_PEAR_MAIL=${INSTALL_PEAR_MAIL}
|
||||||
|
- INSTALL_LIBREOFFICE=${INSTALL_LIBREOFFICE}
|
||||||
- CUSTOM_PUID=${WORKSPACE_PUID}
|
- CUSTOM_PUID=${WORKSPACE_PUID}
|
||||||
- CUSTOM_PGID=${WORKSPACE_PGID}
|
- CUSTOM_PGID=${WORKSPACE_PGID}
|
||||||
- CUSTOM_TZ=${WORKSPACE_TIMEZONE}
|
- CUSTOM_TZ=${WORKSPACE_TIMEZONE}
|
||||||
- PHP_OPT_SHORT_OPEN_TAG=${PHP_OPT_SHORT_OPEN_TAG}
|
- PHP_OPT_SHORT_OPEN_TAG=${PHP_OPT_SHORT_OPEN_TAG}
|
||||||
- PHP_OPT_MAX_EXECUTION_TIME=${WORKSPACE_PHP_OPT_MAX_EXECUTION_TIME}
|
- PHP_OPT_MAX_EXECUTION_TIME=${WORKSPACE_PHP_OPT_MAX_EXECUTION_TIME}
|
||||||
- PHP_OPT_MEMORY_LIMIT=${WORKSPACE_PHP_OPT_MEMORY_LIMIT}
|
- PHP_OPT_MEMORY_LIMIT=${WORKSPACE_PHP_OPT_MEMORY_LIMIT}
|
||||||
|
- INSTALL_SUPERVISOR=${WORKSPACE_INSTALL_SUPERVISOR}
|
||||||
|
- INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON}
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ${PROJECTS_DIR}:/var/www
|
- ${PROJECTS_DIR}:/var/www
|
||||||
|
- ./config/supervisor:/etc/supervisor/conf.d
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "dockerhost:${DOCKER_HOST_IP}"
|
- "dockerhost:${DOCKER_HOST_IP}"
|
||||||
secrets:
|
secrets:
|
||||||
@ -50,13 +57,13 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: 123456
|
MYSQL_ROOT_PASSWORD: 123456
|
||||||
ports:
|
|
||||||
- "3306:3306"
|
|
||||||
volumes:
|
volumes:
|
||||||
- database:/var/lib/mysql
|
- database:/var/lib/mysql
|
||||||
- ./hostfiles:/hostfiles
|
- ./hostfiles:/hostfiles
|
||||||
- ./log/mariadb:/var/log/mariadb
|
- ./log/mariadb:/var/log/mariadb
|
||||||
- ./config/mariadb:/etc/mysql/conf.d
|
- ./config/mariadb:/etc/mysql/conf.d
|
||||||
|
security_opt:
|
||||||
|
- seccomp=unconfined
|
||||||
pma:
|
pma:
|
||||||
image: phpmyadmin/phpmyadmin
|
image: phpmyadmin/phpmyadmin
|
||||||
restart: always
|
restart: always
|
||||||
@ -64,17 +71,41 @@ services:
|
|||||||
PMA_HOST: db
|
PMA_HOST: db
|
||||||
PMA_USER: root
|
PMA_USER: root
|
||||||
PMA_PASSWORD: 123456
|
PMA_PASSWORD: 123456
|
||||||
ports:
|
|
||||||
- "81:80"
|
|
||||||
inbucket:
|
inbucket:
|
||||||
image: inbucket/inbucket
|
image: inbucket/inbucket
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
expose:
|
||||||
- "2500:2500"
|
- 2500
|
||||||
- "9090:9000"
|
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
restart: always
|
restart: always
|
||||||
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
|
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf
|
- ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf
|
||||||
|
elastic:
|
||||||
|
build:
|
||||||
|
context: ./dockerfiles/elastic
|
||||||
|
restart: on-failure
|
||||||
|
environment:
|
||||||
|
- discovery.type=single-node
|
||||||
|
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||||
|
ulimits:
|
||||||
|
memlock:
|
||||||
|
soft: -1
|
||||||
|
hard: -1
|
||||||
|
expose:
|
||||||
|
- "9200"
|
||||||
|
- "9300"
|
||||||
|
minio:
|
||||||
|
image: minio/minio:RELEASE.2020-06-12T00-06-19Z
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
|
||||||
|
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
|
||||||
|
command: server /minio
|
||||||
|
pm2:
|
||||||
|
build:
|
||||||
|
context: ./dockerfiles/pm2
|
||||||
|
restart: always
|
||||||
|
expose:
|
||||||
|
- 3000
|
42
docker-compose.directus.yml.example
Normal file
42
docker-compose.directus.yml.example
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
services:
|
||||||
|
directus-mi:
|
||||||
|
image: directus/directus:11.1.0
|
||||||
|
ports:
|
||||||
|
- 8055:8055
|
||||||
|
volumes:
|
||||||
|
- ./data/directus/mi/uploads:/directus/uploads
|
||||||
|
- ./data/directus/mi/extensions:/directus/extensions
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
- redis-mi
|
||||||
|
environment:
|
||||||
|
KEY: ""
|
||||||
|
SECRET: ""
|
||||||
|
|
||||||
|
DB_CLIENT: "mysql"
|
||||||
|
DB_HOST: "db"
|
||||||
|
DB_PORT: "3306"
|
||||||
|
DB_DATABASE: "directus"
|
||||||
|
DB_USER: "directus"
|
||||||
|
DB_PASSWORD: "directus"
|
||||||
|
|
||||||
|
CACHE_ENABLED: "true"
|
||||||
|
CACHE_AUTO_PURGE: "true"
|
||||||
|
CACHE_STORE: "redis"
|
||||||
|
REDIS: "redis://redis-mi:6379"
|
||||||
|
|
||||||
|
CACHE_TTL: 1d
|
||||||
|
|
||||||
|
ADMIN_EMAIL: "info@wpstudio.ru"
|
||||||
|
ADMIN_PASSWORD: ""
|
||||||
|
|
||||||
|
TELEMETRY: false
|
||||||
|
ACCESS_TOKEN_TTL: 15m
|
||||||
|
REFRESH_TOKEN_TTL: 7d
|
||||||
|
LOG_LEVEL: debug
|
||||||
|
FLOWS_EXEC_ALLOWED_MODULES: "array:@elastic/elasticsearch"
|
||||||
|
WEBSOCKETS_ENABLED: true
|
||||||
|
|
||||||
|
# Make sure to set this in production
|
||||||
|
# (see https://docs.directus.io/self-hosted/config-options#general)
|
||||||
|
# PUBLIC_URL: "https://directus.example.com"
|
10
docker-compose.e2e.yml.example
Executable file
10
docker-compose.e2e.yml.example
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
services:
|
||||||
|
browserless:
|
||||||
|
image: browserless/chrome:latest
|
||||||
|
environment:
|
||||||
|
- HOST=0.0.0.0
|
||||||
|
- PORT=3000
|
||||||
|
container_name: "browserless"
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
@ -1,18 +0,0 @@
|
|||||||
version: '3.6'
|
|
||||||
|
|
||||||
services:
|
|
||||||
elastic:
|
|
||||||
build:
|
|
||||||
context: ./dockerfiles/elastic
|
|
||||||
restart: on-failure
|
|
||||||
environment:
|
|
||||||
- discovery.type=single-node
|
|
||||||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
|
||||||
ulimits:
|
|
||||||
memlock:
|
|
||||||
soft: -1
|
|
||||||
hard: -1
|
|
||||||
mem_limit: 2g
|
|
||||||
expose:
|
|
||||||
- "9200"
|
|
||||||
- "9300"
|
|
@ -3,7 +3,7 @@ version: '3.6'
|
|||||||
services:
|
services:
|
||||||
elastic:
|
elastic:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.elastic.base.yml
|
file: docker-compose.base.yml
|
||||||
service: elastic
|
service: elastic
|
||||||
restart: always
|
restart: always
|
||||||
build:
|
build:
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
version: '3.6'
|
|
||||||
|
|
||||||
services:
|
|
||||||
minio:
|
|
||||||
image: minio/minio:RELEASE.2020-06-12T00-06-19Z
|
|
||||||
restart: always
|
|
||||||
environment:
|
|
||||||
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
|
|
||||||
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
|
|
||||||
command: server /minio
|
|
@ -3,7 +3,7 @@ version: '3.6'
|
|||||||
services:
|
services:
|
||||||
minio:
|
minio:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.minio.base.yml
|
file: docker-compose.base.yml
|
||||||
service: minio
|
service: minio
|
||||||
volumes:
|
volumes:
|
||||||
- minio:/minio
|
- minio:/minio
|
||||||
|
12
docker-compose.minio.yml.example
Executable file
12
docker-compose.minio.yml.example
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
version: '3.6'
|
||||||
|
|
||||||
|
services:
|
||||||
|
minio:
|
||||||
|
extends:
|
||||||
|
file: docker-compose.base.yml
|
||||||
|
service: minio
|
||||||
|
volumes:
|
||||||
|
- minio:/minio
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
minio:
|
15
docker-compose.nodejs.yml.example
Executable file
15
docker-compose.nodejs.yml.example
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
version: '3.6'
|
||||||
|
|
||||||
|
services:
|
||||||
|
pm2-someprojectone:
|
||||||
|
extends:
|
||||||
|
file: docker-compose.base.yml
|
||||||
|
service: pm2
|
||||||
|
volumes:
|
||||||
|
- ${PROJECTS_DIR}/someprojectone/.output:/.output
|
||||||
|
pm2-someprojecttwo:
|
||||||
|
extends:
|
||||||
|
file: docker-compose.base.yml
|
||||||
|
service: pm2
|
||||||
|
volumes:
|
||||||
|
- ${PROJECTS_DIR}/someprojecttwo/.output:/.output
|
11
docker-compose.redis.yml.example
Executable file
11
docker-compose.redis.yml.example
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
version: '3.6'
|
||||||
|
|
||||||
|
services:
|
||||||
|
redis-someprojectone:
|
||||||
|
extends:
|
||||||
|
file: docker-compose.base.yml
|
||||||
|
service: redis
|
||||||
|
redis-someprojecttwo:
|
||||||
|
extends:
|
||||||
|
file: docker-compose.base.yml
|
||||||
|
service: redis
|
@ -1,5 +1,3 @@
|
|||||||
version: '3.9'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
nginx:
|
nginx:
|
||||||
extends:
|
extends:
|
||||||
@ -8,7 +6,10 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
aliases:
|
aliases:
|
||||||
- loc.yoursite.ru
|
- someproject.local.wpstudio.ru
|
||||||
|
depends_on:
|
||||||
|
- php74
|
||||||
|
- php81
|
||||||
php74:
|
php74:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
@ -21,6 +22,13 @@ services:
|
|||||||
service: php
|
service: php
|
||||||
build:
|
build:
|
||||||
dockerfile: php81.Dockerfile
|
dockerfile: php81.Dockerfile
|
||||||
|
php82:
|
||||||
|
extends:
|
||||||
|
file: docker-compose.base.yml
|
||||||
|
service: php
|
||||||
|
build:
|
||||||
|
dockerfile: php82.Dockerfile
|
||||||
|
volumes:
|
||||||
workspace74:
|
workspace74:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
@ -33,6 +41,12 @@ services:
|
|||||||
service: workspace
|
service: workspace
|
||||||
build:
|
build:
|
||||||
dockerfile: workspace81.Dockerfile
|
dockerfile: workspace81.Dockerfile
|
||||||
|
workspace82:
|
||||||
|
extends:
|
||||||
|
file: docker-compose.base.yml
|
||||||
|
service: workspace
|
||||||
|
build:
|
||||||
|
dockerfile: workspace82.Dockerfile
|
||||||
db:
|
db:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
@ -41,18 +55,22 @@ services:
|
|||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
service: pma
|
service: pma
|
||||||
|
ports:
|
||||||
|
- "81:80"
|
||||||
inbucket:
|
inbucket:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
service: inbucket
|
service: inbucket
|
||||||
redis:
|
ports:
|
||||||
extends:
|
- "82:9000"
|
||||||
file: docker-compose.base.yml
|
dnsmasq:
|
||||||
service: redis
|
restart: always
|
||||||
redis-some:
|
build:
|
||||||
extends:
|
context: ./dockerfiles/dnsmasq
|
||||||
file: docker-compose.base.yml
|
volumes:
|
||||||
service: redis
|
- ./config/dnsmasq/dnsmasq.conf:/etc/dnsmasq.conf
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN # @see https://man7.org/linux/man-pages/man7/capabilities.7.html
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
database:
|
database:
|
||||||
|
9
dockerfiles/dnsmasq/Dockerfile
Normal file
9
dockerfiles/dnsmasq/Dockerfile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
# @see https://github.com/mcmar/docker-dnsmasq
|
||||||
|
|
||||||
|
RUN apk --no-cache add dnsmasq
|
||||||
|
|
||||||
|
EXPOSE 53/tcp 53/udp 67/udp
|
||||||
|
|
||||||
|
CMD ["dnsmasq", "-k"]
|
@ -33,6 +33,20 @@ RUN if [ ${INSTALL_PEAR_MAIL} = true ]; then \
|
|||||||
COPY ./xdebug3/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
COPY ./xdebug3/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
# Libreoffice
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_LIBREOFFICE=false
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_LIBREOFFICE} = true ]; then \
|
||||||
|
apt-get update \
|
||||||
|
&& apt-get install -y libreoffice-nogui --no-install-recommends \
|
||||||
|
&& apt-get clean \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
# Tune opts:
|
# Tune opts:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
|
58
dockerfiles/php-fpm/php82.Dockerfile
Normal file
58
dockerfiles/php-fpm/php82.Dockerfile
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
FROM dimti/php:8.2
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Redis and igbinary:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_REDIS=false
|
||||||
|
|
||||||
|
COPY ./igbinary.ini /usr/local/etc/php/conf.d/igbinary.ini
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_REDIS} = true ]; then \
|
||||||
|
pecl install -a igbinary \
|
||||||
|
&& docker-php-ext-enable igbinary \
|
||||||
|
&& printf "yes\n" | pecl install redis \
|
||||||
|
&& docker-php-ext-enable redis \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Pear Mail and Mail_Mime:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_PEAR_MAIL=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_PEAR_MAIL} = true ]; then \
|
||||||
|
pear install Mail && pear install Mail_Mime \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# xDebug (termporary):
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
# Copy xdebug configuration for remote debugging
|
||||||
|
COPY ./xdebug3/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Tune opts:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG PHP_OPT_SHORT_OPEN_TAG=Off
|
||||||
|
RUN sed -i "s/^short_open_tag = .*/short_open_tag = $PHP_OPT_SHORT_OPEN_TAG/g" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
ARG PHP_OPT_MAX_EXECUTION_TIME=600
|
||||||
|
RUN sed -i "s/^max_execution_time = .*/max_execution_time = $PHP_OPT_MAX_EXECUTION_TIME/g" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
ARG PHP_OPT_MEMORY_LIMIT=256M
|
||||||
|
RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
ARG PHP_OPT_POST_MAX_SIZE=48M
|
||||||
|
RUN sed -i "s/^post_max_size = .*/post_max_size = $PHP_OPT_POST_MAX_SIZE/g" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
ARG PHP_OPT_UPLOAD_MAX_FILESIZE=16M
|
||||||
|
RUN sed -i "s/^upload_max_filesize = .*/upload_max_filesize = $PHP_OPT_UPLOAD_MAX_FILESIZE/g" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Libreoffice:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y libreoffice-nogui --no-install-recommends && apt-get clean
|
@ -27,7 +27,7 @@ xdebug_status ()
|
|||||||
|
|
||||||
xdebug_start ()
|
xdebug_start ()
|
||||||
{
|
{
|
||||||
echo 'Start xDebug'
|
echo 'Start xDebug2'
|
||||||
|
|
||||||
# And uncomment line with xdebug extension, thus enabling it
|
# And uncomment line with xdebug extension, thus enabling it
|
||||||
ON_CMD="sed -i 's/^;zend_extension=/zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
|
ON_CMD="sed -i 's/^;zend_extension=/zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
|
||||||
@ -48,7 +48,7 @@ xdebug_start ()
|
|||||||
|
|
||||||
xdebug_stop ()
|
xdebug_stop ()
|
||||||
{
|
{
|
||||||
echo 'Stop xDebug'
|
echo 'Stop xDebug2'
|
||||||
|
|
||||||
# Comment out xdebug extension line
|
# Comment out xdebug extension line
|
||||||
OFF_CMD="sed -i 's/^zend_extension=/;zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
|
OFF_CMD="sed -i 's/^zend_extension=/;zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
xdebug.mode=off
|
xdebug.mode=off
|
||||||
xdebug.discover_client_host=1
|
xdebug.discover_client_host=1
|
||||||
xdebug.start_with_request=yes
|
xdebug.start_with_request=yes
|
||||||
|
xdebug.output_dir=/tmp/profiler
|
||||||
|
@ -27,11 +27,18 @@ xdebug_status ()
|
|||||||
|
|
||||||
xdebug_start ()
|
xdebug_start ()
|
||||||
{
|
{
|
||||||
echo 'Start xDebug'
|
echo 'Start xDebug3'
|
||||||
|
|
||||||
# And uncomment line with xdebug extension, thus enabling it
|
# And uncomment line with xdebug extension, thus enabling it
|
||||||
ON_CMD="sed -i 's/^;zend_extension=/zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
|
ON_CMD="sed -i 's/^;zend_extension=/zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
|
||||||
MODE_DEBUG_CMD="sed -i 's/^xdebug.mode.*/xdebug.mode=debug/g' /usr/local/etc/php/conf.d/xdebug.ini"
|
|
||||||
|
if [[ -n "${WITH_PROFILER}" ]]; then
|
||||||
|
XDEBUG_MODE='profile'
|
||||||
|
else
|
||||||
|
XDEBUG_MODE='debug'
|
||||||
|
fi
|
||||||
|
|
||||||
|
MODE_DEBUG_CMD="sed -i 's/^xdebug.mode.*/xdebug.mode=${XDEBUG_MODE}/g' /usr/local/etc/php/conf.d/xdebug.ini"
|
||||||
|
|
||||||
docker exec -it $PHP_FPM_CONTAINER bash -c "${ON_CMD}"
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${ON_CMD}"
|
||||||
docker exec -it $PHP_FPM_CONTAINER bash -c "${MODE_DEBUG_CMD}"
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${MODE_DEBUG_CMD}"
|
||||||
@ -42,7 +49,7 @@ xdebug_start ()
|
|||||||
|
|
||||||
xdebug_stop ()
|
xdebug_stop ()
|
||||||
{
|
{
|
||||||
echo 'Stop xDebug'
|
echo 'Stop xDebug3'
|
||||||
|
|
||||||
# Comment out xdebug extension line
|
# Comment out xdebug extension line
|
||||||
OFF_CMD="sed -i 's/^zend_extension=/;zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
|
OFF_CMD="sed -i 's/^zend_extension=/;zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
|
||||||
|
5
dockerfiles/pm2/Dockerfile
Normal file
5
dockerfiles/pm2/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
FROM keymetrics/pm2:18-buster
|
||||||
|
|
||||||
|
COPY ./ecosystem.config.js /ecosystem.config.js
|
||||||
|
|
||||||
|
CMD ["pm2-runtime", "start", "ecosystem.config.js"]
|
11
dockerfiles/pm2/ecosystem.config.js
Normal file
11
dockerfiles/pm2/ecosystem.config.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
module.exports = {
|
||||||
|
apps: [
|
||||||
|
{
|
||||||
|
name: 'NuxtAppName',
|
||||||
|
port: '3000',
|
||||||
|
exec_mode: 'cluster',
|
||||||
|
instances: '2',
|
||||||
|
script: './.output/server/index.mjs',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
6
dockerfiles/workspace/.bash_aliases.example
Normal file
6
dockerfiles/workspace/.bash_aliases.example
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
alias gst='git status'
|
||||||
|
alias ga='git add'
|
||||||
|
alias gc='git commit -m'
|
||||||
|
alias gush='git push'
|
||||||
|
alias gull='git pull'
|
||||||
|
alias gb='git branch'
|
3
dockerfiles/workspace/.gitignore
vendored
3
dockerfiles/workspace/.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/aliases.sh
|
/.bash_*
|
||||||
|
!/.bash_.example
|
||||||
/crontab
|
/crontab
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
# Colors used for status updates
|
|
||||||
ESC_SEQ="\x1b["
|
|
||||||
COL_RESET=$ESC_SEQ"39;49;00m"
|
|
||||||
COL_RED=$ESC_SEQ"31;01m"
|
|
||||||
COL_GREEN=$ESC_SEQ"32;01m"
|
|
||||||
COL_YELLOW=$ESC_SEQ"33;01m"
|
|
||||||
COL_BLUE=$ESC_SEQ"34;01m"
|
|
||||||
COL_MAGENTA=$ESC_SEQ"35;01m"
|
|
||||||
COL_CYAN=$ESC_SEQ"36;01m"
|
|
||||||
|
|
||||||
# Detect which `ls` flavor is in use
|
|
||||||
if ls --color > /dev/null 2>&1; then # GNU `ls`
|
|
||||||
colorflag="--color"
|
|
||||||
export LS_COLORS='no=00:fi=00:di=01;31:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:'
|
|
||||||
else # macOS `ls`
|
|
||||||
colorflag="-G"
|
|
||||||
export LSCOLORS='BxBxhxDxfxhxhxhxhxcxcx'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Always use color output for `ls`
|
|
||||||
alias ls="command ls ${colorflag}"
|
|
||||||
|
|
||||||
alias gst='git status'
|
|
||||||
alias ga='git add'
|
|
||||||
alias gc='git commit -m'
|
|
||||||
alias gush='git push'
|
|
||||||
alias gull='git pull'
|
|
||||||
alias gb='git branch'
|
|
@ -71,17 +71,72 @@ RUN composer self-update # Need for correctly update to actual old branch
|
|||||||
RUN composer self-update --${COMPOSER_VERSION}
|
RUN composer self-update --${COMPOSER_VERSION}
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Laradock Aliases
|
# YADM
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
|
# once please
|
||||||
|
RUN apt update
|
||||||
|
|
||||||
|
RUN apt install -y direnv yadm
|
||||||
|
RUN curl -sS https://starship.rs/install.sh | sh -s -- -f
|
||||||
|
|
||||||
USER laradock
|
USER laradock
|
||||||
|
|
||||||
COPY ./aliases.sh /home/laradock/aliases.sh
|
RUN yadm clone --bootstrap https://vcs.wpstudio.ru/gitea/dotfiles.git
|
||||||
|
|
||||||
RUN echo "" >> ~/.bashrc && \
|
RUN sed -i 's/#/\\$/g' ${HOME}/.config/starship.toml
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
|
||||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
###########################################################################
|
||||||
echo "" >> ~/.bashrc
|
# SUPERVISOR:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG INSTALL_SUPERVISOR=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_SUPERVISOR} = true ]; then \
|
||||||
|
apt install -y supervisor \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
RUN apt install -y liblzma-dev libbz2-dev libffi-dev libreadline-dev
|
||||||
|
|
||||||
|
USER laradock
|
||||||
|
|
||||||
|
RUN curl https://pyenv.run | bash
|
||||||
|
|
||||||
|
RUN echo '' >> ~/.shell-env.local && \
|
||||||
|
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.shell-env.local && \
|
||||||
|
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.shell-env.local && \
|
||||||
|
echo 'eval "$(pyenv init -)"' >> ~/.shell-env.local && \
|
||||||
|
echo '' >> ~/.shell-env.local && \
|
||||||
|
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.shell-env.local && \
|
||||||
|
echo '' >> ~/.shell-env.local
|
||||||
|
|
||||||
|
RUN $HOME/.pyenv/bin/pyenv install 3.9
|
||||||
|
|
||||||
|
ARG INSTALL_PYTHON=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
||||||
|
export PYENV_VERSION=3.9 && \
|
||||||
|
python -m pip install uvicorn \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
RUN if [ false = true ]; then \
|
||||||
|
export PYENV_VERSION=3.9 && \
|
||||||
|
python -m pip install uvicorn && \
|
||||||
|
python -m pip install --upgrade supervisor && \
|
||||||
|
echo_supervisord_conf > /etc/supervisord.conf && \
|
||||||
|
sed -i 's/\;\[include\]/\[include\]/g' /etc/supervisord.conf && \
|
||||||
|
sed -i 's/\;files\s.*/files = supervisord.d\/*.conf/g' /etc/supervisord.conf \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
RUN apt install -y htop
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Tune opts:
|
# Tune opts:
|
||||||
@ -104,6 +159,13 @@ RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" /etc/ph
|
|||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
RUN apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
COPY ./crontab /etc/cron.d
|
COPY ./crontab /etc/cron.d
|
||||||
|
|
||||||
RUN chmod -R 644 /etc/cron.d
|
RUN chmod -R 644 /etc/cron.d
|
||||||
|
|
||||||
|
|
||||||
|
#ENTRYPOINT ["/bin/bash","-c","service supervisor start"]
|
@ -28,10 +28,29 @@ RUN ln -snf /usr/share/zoneinfo/$CUSTOM_TZ /etc/localtime && echo $CUSTOM_TZ > /
|
|||||||
# Additional PHP-extensions:
|
# Additional PHP-extensions:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
#RUN pecl install igbinary && pecl install -a redis
|
ARG INSTALL_REDIS=false
|
||||||
RUN pecl install -a redis
|
|
||||||
|
|
||||||
RUN echo "extension=redis.so" > /etc/php/${PHP_VERSION}/cli/conf.d/20-redis.ini
|
#RUN pecl install igbinary
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_REDIS} = true ]; then \
|
||||||
|
pecl install -a redis \
|
||||||
|
echo "extension=redis.so" > /etc/php/${PHP_VERSION}/cli/conf.d/20-redis.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Libreoffice
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_LIBREOFFICE=false
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_LIBREOFFICE} = true ]; then \
|
||||||
|
add-apt-repository ppa:libreoffice/ppa \
|
||||||
|
&& apt update \
|
||||||
|
&& apt install libreoffice-nogui -y --no-install-recommends \
|
||||||
|
&& apt clean \
|
||||||
|
;fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# S3 config
|
# S3 config
|
||||||
|
115
dockerfiles/workspace/workspace82.Dockerfile
Normal file
115
dockerfiles/workspace/workspace82.Dockerfile
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
FROM dimti/workspace:8.2
|
||||||
|
|
||||||
|
ARG PHP_VERSION=8.2
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Laradock non-root user:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG CUSTOM_PUID=1000
|
||||||
|
ENV PUID ${CUSTOM_PUID}
|
||||||
|
ARG CUSTOM_PGID=1000
|
||||||
|
ENV PGID ${CUSTOM_PGID}
|
||||||
|
|
||||||
|
RUN usermod -u ${CUSTOM_PUID} laradock && groupmod -g ${CUSTOM_PGID} laradock
|
||||||
|
|
||||||
|
RUN chown -R ${CUSTOM_PUID}:${CUSTOM_PGID} /home/laradock
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Set Timezone
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG CUSTOM_TZ=Europe/Moscow
|
||||||
|
ENV TZ ${CUSTOM_TZ}
|
||||||
|
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/$CUSTOM_TZ /etc/localtime && echo $CUSTOM_TZ > /etc/timezone
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Additional PHP-extensions:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#RUN pecl install igbinary && pecl install -a redis
|
||||||
|
RUN pecl install -a redis
|
||||||
|
|
||||||
|
RUN echo "extension=redis.so" > /etc/php/${PHP_VERSION}/cli/conf.d/20-redis.ini
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# S3 config
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
USER laradock
|
||||||
|
|
||||||
|
COPY ./minio/auth.json /home/laradock/.mc/config.json
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Install custom node version
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG NODE_VERSION
|
||||||
|
ENV NODE_VERSION ${NODE_VERSION}
|
||||||
|
|
||||||
|
RUN if [ ! -z "${NODE_VERSION}" ]; then \
|
||||||
|
. ~/.bashrc && nvm install ${NODE_VERSION} \
|
||||||
|
&& . ~/.bashrc && nvm alias default ${NODE_VERSION} \
|
||||||
|
&& npm i -g yarn \
|
||||||
|
&& cp -R ~/.nvm/alias /home/laradock/.nvm \
|
||||||
|
&& cp -R ~/.nvm/versions /home/laradock/.nvm \
|
||||||
|
&& chown -R ${CUSTOM_PUID}:${CUSTOM_PGID} /home/laradock/.nvm \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Update composer version
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG COMPOSER_VERSION=2
|
||||||
|
ENV COMPOSER_VERSION ${COMPOSER_VERSION}
|
||||||
|
RUN composer self-update --${COMPOSER_VERSION}
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Laradock Aliases
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
USER laradock
|
||||||
|
|
||||||
|
COPY ./aliases.sh /home/laradock/aliases.sh
|
||||||
|
|
||||||
|
RUN echo "" >> ~/.bashrc && \
|
||||||
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
|
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
||||||
|
echo "" >> ~/.bashrc
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Tune opts:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG PHP_OPT_SHORT_OPEN_TAG=Off
|
||||||
|
RUN sed -i "s/^short_open_tag = .*/short_open_tag = $PHP_OPT_SHORT_OPEN_TAG/g" /etc/php/${PHP_VERSION}/cli/php.ini
|
||||||
|
|
||||||
|
ARG PHP_OPT_MAX_EXECUTION_TIME=600
|
||||||
|
RUN sed -i "s/^max_execution_time = .*/max_execution_time = $PHP_OPT_MAX_EXECUTION_TIME/g" /etc/php/${PHP_VERSION}/cli/php.ini
|
||||||
|
|
||||||
|
ARG PHP_OPT_MEMORY_LIMIT=256M
|
||||||
|
RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" /etc/php/${PHP_VERSION}/cli/php.ini
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Crontab
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
COPY ./crontab /etc/cron.d
|
||||||
|
|
||||||
|
RUN chmod -R 644 /etc/cron.d
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Libreoffice:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
RUN add-apt-repository ppa:libreoffice/ppa && apt update && apt install libreoffice-nogui -y --no-install-recommends && apt clean
|
4
src/.env
4
src/.env
@ -6,12 +6,12 @@ WORKSPACE_INSTALL_SSH=true
|
|||||||
WORKSPACE_INSTALL_MYSQL_CLIENT=true
|
WORKSPACE_INSTALL_MYSQL_CLIENT=true
|
||||||
WORKSPACE_INSTALL_FSWATCH=false
|
WORKSPACE_INSTALL_FSWATCH=false
|
||||||
WORKSPACE_INSTALL_PING=true
|
WORKSPACE_INSTALL_PING=true
|
||||||
WORKSPACE_INSTALL_S3_MINIO_CLIENT=true
|
WORKSPACE_INSTALL_S3_MINIO_CLIENT=false
|
||||||
WORKSPACE_INSTALL_BZ2=true
|
WORKSPACE_INSTALL_BZ2=true
|
||||||
# PHP-extensions already installed: INTL, PGSQL, BCMATH
|
# PHP-extensions already installed: INTL, PGSQL, BCMATH
|
||||||
WORKSPACE_INSTALL_WP_CLI=true
|
WORKSPACE_INSTALL_WP_CLI=true
|
||||||
WORKSPACE_INSTALL_NODE=true
|
WORKSPACE_INSTALL_NODE=true
|
||||||
WORKSPACE_INSTALL_GULP=true
|
WORKSPACE_INSTALL_GULP=false
|
||||||
WORKSPACE_INSTALL_YARN=true
|
WORKSPACE_INSTALL_YARN=true
|
||||||
WORKSPACE_NODE_VERSION=lts/hydrogen
|
WORKSPACE_NODE_VERSION=lts/hydrogen
|
||||||
WORKSPACE_NPM_REGISTRY=
|
WORKSPACE_NPM_REGISTRY=
|
||||||
|
@ -19,6 +19,12 @@ services:
|
|||||||
service: php-fpm
|
service: php-fpm
|
||||||
build:
|
build:
|
||||||
dockerfile: php81.Dockerfile
|
dockerfile: php81.Dockerfile
|
||||||
|
php82:
|
||||||
|
extends:
|
||||||
|
file: docker-compose.base.yml
|
||||||
|
service: php-fpm
|
||||||
|
build:
|
||||||
|
dockerfile: php82.Dockerfile
|
||||||
workspace74:
|
workspace74:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
@ -31,3 +37,9 @@ services:
|
|||||||
service: workspace
|
service: workspace
|
||||||
build:
|
build:
|
||||||
dockerfile: workspace81.Dockerfile
|
dockerfile: workspace81.Dockerfile
|
||||||
|
workspace82:
|
||||||
|
extends:
|
||||||
|
file: docker-compose.base.yml
|
||||||
|
service: workspace
|
||||||
|
build:
|
||||||
|
dockerfile: workspace82.Dockerfile
|
||||||
|
@ -21,7 +21,13 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
|||||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||||
pecl install xdebug-2.5.5; \
|
pecl install xdebug-2.5.5; \
|
||||||
elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
||||||
pecl install xdebug-3.1.6; \
|
if [ $(php -r "echo PHP_MINOR_VERSION;") = "1" ]; then \
|
||||||
|
pecl install xdebug-3.1.6; \
|
||||||
|
elif [ $(php -r "echo PHP_MINOR_VERSION;") = "2" ]; then \
|
||||||
|
pecl install xdebug-3.3.1; \
|
||||||
|
else \
|
||||||
|
pecl install xdebug; \
|
||||||
|
fi \
|
||||||
else \
|
else \
|
||||||
pecl install xdebug-2.9.8; \
|
pecl install xdebug-2.9.8; \
|
||||||
fi && \
|
fi && \
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# syntax = edrevo/dockerfile-plus
|
# syntax = edrevo/dockerfile-plus
|
||||||
|
# https://github.com/docker-library/php/blob/52062af5056d0cd91fa5ded64fad8f9c82847b49/8.1/bookworm/fpm/Dockerfile
|
||||||
FROM php:8.1-fpm
|
FROM php:8.1-fpm
|
||||||
|
|
||||||
INCLUDE+ ./php.base.Dockerfile
|
INCLUDE+ ./php.base.Dockerfile
|
||||||
|
7
src/dockerfiles/php-fpm/php82.Dockerfile
Normal file
7
src/dockerfiles/php-fpm/php82.Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# syntax = edrevo/dockerfile-plus
|
||||||
|
FROM php:8.2-fpm
|
||||||
|
|
||||||
|
INCLUDE+ ./php.base.Dockerfile
|
||||||
|
|
||||||
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
|
||||||
|
&& docker-php-ext-install -j$(nproc) gd
|
84
src/dockerfiles/workspace/completion.sh
Normal file
84
src/dockerfiles/workspace/completion.sh
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
# This file is part of the Symfony package.
|
||||||
|
#
|
||||||
|
# (c) Fabien Potencier <fabien@symfony.com>
|
||||||
|
#
|
||||||
|
# For the full copyright and license information, please view
|
||||||
|
# https://symfony.com/doc/current/contributing/code/license.html
|
||||||
|
|
||||||
|
_sf_artisan() {
|
||||||
|
# Use newline as only separator to allow space in completion values
|
||||||
|
IFS=$'\n'
|
||||||
|
local sf_cmd="${COMP_WORDS[0]}"
|
||||||
|
|
||||||
|
# for an alias, get the real script behind it
|
||||||
|
sf_cmd_type=$(type -t $sf_cmd)
|
||||||
|
if [[ $sf_cmd_type == "alias" ]]; then
|
||||||
|
sf_cmd=$(alias $sf_cmd | sed -E "s/alias $sf_cmd='(.*)'/\1/")
|
||||||
|
elif [[ $sf_cmd_type == "file" ]]; then
|
||||||
|
sf_cmd=$(type -p $sf_cmd)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $sf_cmd_type != "function" && ! -x $sf_cmd ]]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local cur prev words cword
|
||||||
|
_get_comp_words_by_ref -n := cur prev words cword
|
||||||
|
|
||||||
|
local completecmd=("$sf_cmd" "_complete" "--no-interaction" "-sbash" "-c$cword" "-a1")
|
||||||
|
for w in ${words[@]}; do
|
||||||
|
w=$(printf -- '%b' "$w")
|
||||||
|
# remove quotes from typed values
|
||||||
|
quote="${w:0:1}"
|
||||||
|
if [ "$quote" == \' ]; then
|
||||||
|
w="${w%\'}"
|
||||||
|
w="${w#\'}"
|
||||||
|
elif [ "$quote" == \" ]; then
|
||||||
|
w="${w%\"}"
|
||||||
|
w="${w#\"}"
|
||||||
|
fi
|
||||||
|
# empty values are ignored
|
||||||
|
if [ ! -z "$w" ]; then
|
||||||
|
completecmd+=("-i$w")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
local sfcomplete
|
||||||
|
if sfcomplete=$(${completecmd[@]} 2>&1); then
|
||||||
|
local quote suggestions
|
||||||
|
quote=${cur:0:1}
|
||||||
|
|
||||||
|
# Use single quotes by default if suggestions contains backslash (FQCN)
|
||||||
|
if [ "$quote" == '' ] && [[ "$sfcomplete" =~ \\ ]]; then
|
||||||
|
quote=\'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$quote" == \' ]; then
|
||||||
|
# single quotes: no additional escaping (does not accept ' in values)
|
||||||
|
suggestions=$(for s in $sfcomplete; do printf $'%q%q%q\n' "$quote" "$s" "$quote"; done)
|
||||||
|
elif [ "$quote" == \" ]; then
|
||||||
|
# double quotes: double escaping for \ $ ` "
|
||||||
|
suggestions=$(for s in $sfcomplete; do
|
||||||
|
s=${s//\\/\\\\}
|
||||||
|
s=${s//\$/\\\$}
|
||||||
|
s=${s//\`/\\\`}
|
||||||
|
s=${s//\"/\\\"}
|
||||||
|
printf $'%q%q%q\n' "$quote" "$s" "$quote";
|
||||||
|
done)
|
||||||
|
else
|
||||||
|
# no quotes: double escaping
|
||||||
|
suggestions=$(for s in $sfcomplete; do printf $'%q\n' $(printf '%q' "$s"); done)
|
||||||
|
fi
|
||||||
|
COMPREPLY=($(IFS=$'\n' compgen -W "$suggestions" -- $(printf -- "%q" "$cur")))
|
||||||
|
__ltrim_colon_completions "$cur"
|
||||||
|
else
|
||||||
|
if [[ "$sfcomplete" != *"Command \"_complete\" is not defined."* ]]; then
|
||||||
|
>&2 echo
|
||||||
|
>&2 echo $sfcomplete
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
complete -F _sf_artisan artisan
|
@ -74,7 +74,7 @@ RUN sed -i 's/\r//' /root/aliases.sh && \
|
|||||||
echo "" >> ~/.bashrc && \
|
echo "" >> ~/.bashrc && \
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
||||||
echo "" >> ~/.bashrc \
|
echo "" >> ~/.bashrc
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# ssh:
|
# ssh:
|
||||||
@ -158,7 +158,13 @@ RUN if [ ${INSTALL_S3_MINIO_CLIENT} = true ]; then \
|
|||||||
RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||||
pecl install xdebug-2.5.5; \
|
pecl install xdebug-2.5.5; \
|
||||||
elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
||||||
pecl install xdebug-3.1.6; \
|
if [ $(php -r "echo PHP_MINOR_VERSION;") = "1" ]; then \
|
||||||
|
pecl install xdebug-3.1.6; \
|
||||||
|
elif [ $(php -r "echo PHP_MINOR_VERSION;") = "2" ]; then \
|
||||||
|
pecl install xdebug-3.3.1; \
|
||||||
|
else \
|
||||||
|
pecl install xdebug; \
|
||||||
|
fi \
|
||||||
else \
|
else \
|
||||||
pecl install xdebug-2.9.8; \
|
pecl install xdebug-2.9.8; \
|
||||||
fi && \
|
fi && \
|
||||||
@ -252,6 +258,14 @@ USER root
|
|||||||
RUN sed -i 's/^mozilla\/DST_Root_CA_X3\.crt/!mozilla\/DST_Root_CA_X3.crt/g' /etc/ca-certificates.conf && update-ca-certificates
|
RUN sed -i 's/^mozilla\/DST_Root_CA_X3\.crt/!mozilla\/DST_Root_CA_X3.crt/g' /etc/ca-certificates.conf && update-ca-certificates
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
# Artisan bash autocompletion from symphony
|
||||||
|
# @see https://wintercms.com/docs/v1.2/docs/console/introduction#autocompletion--suggested-input-values
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
RUN apt install bash-completion
|
||||||
|
COPY /completion.sh /etc/bash_completion.d/artisan
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
# Tune opts:
|
# Tune opts:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
|
9
src/dockerfiles/workspace/workspace82.Dockerfile
Normal file
9
src/dockerfiles/workspace/workspace82.Dockerfile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# syntax = edrevo/dockerfile-plus
|
||||||
|
FROM laradock/workspace:latest-8.2
|
||||||
|
|
||||||
|
ARG PHP_VERSION=8.2
|
||||||
|
ENV PHP_VERSION ${PHP_VERSION}
|
||||||
|
|
||||||
|
INCLUDE+ ./workspace.base.Dockerfile
|
||||||
|
INCLUDE+ ./composer.Dockerfile
|
||||||
|
INCLUDE+ ./xdebug3.Dockerfile
|
@ -1,2 +1,3 @@
|
|||||||
xdebug.mode=debug
|
xdebug.mode=debug
|
||||||
|
xdebug.client_host=dockerhost
|
||||||
xdebug.start_with_request=yes
|
xdebug.start_with_request=yes
|
||||||
|
Reference in New Issue
Block a user