Compare commits
102 Commits
3955c89a85
...
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 | |||
b1b2e1d501 | |||
baa258b8fb | |||
cea2dbb653 | |||
217250c0e0 | |||
a87fc51072 | |||
d29546cb34 | |||
1b35c6927c | |||
767aa7ba37 | |||
1771877fe8 | |||
fc044a1185 | |||
38cb19818a | |||
c07f142607 | |||
ca9f40667b | |||
7de00f8385 | |||
0bbc4eedd7 | |||
42d0209290 | |||
75b35e22a9 | |||
97609898e1 | |||
15c6a8eb53 | |||
829107e5f5 | |||
ee023006ff | |||
dbe3a916f1 | |||
9fab9307b6 | |||
71d4b97c46 | |||
c3d132b120 | |||
d625dbb158 | |||
aa74376503 | |||
9bc71f7b2d | |||
c11eb7bf7c | |||
b0683316de | |||
2b24d70652 | |||
db86932c71 | |||
57cc040b3a | |||
04d399489b | |||
de93f6746b | |||
075f50b08c | |||
63500c4fff | |||
8c72843191 | |||
db2c2aac82 | |||
3cd2603bf3 | |||
d6d86179e6 | |||
2d0fc4385d | |||
54a04feae7 | |||
6743629602 | |||
5cf2889c55 | |||
ec68f3549e | |||
a2fb8827c3 | |||
4201d657d6 | |||
4a0dbb92d8 | |||
4bac781c3b | |||
471b5c1502 | |||
b85b503015 | |||
cd38a60396 | |||
be1385a4a5 | |||
cbb1d79584 | |||
e6477518d2 | |||
0f9a528f62 | |||
ea0ee2c28a | |||
d6b28eeb74 | |||
b10442065d | |||
8c8e29a918 | |||
1945097f11 | |||
3535a09ce9 | |||
93eddcdf84 | |||
10231ac87b | |||
c5e6559db2 | |||
73e2eb7853 | |||
db0bb333fa | |||
0a3a980f8b | |||
07e3499946 | |||
9103721fbe | |||
4ae9b30644 | |||
e9596a7e11 | |||
5f1e9498c8 | |||
ec31427cb7 |
27
.env.example
27
.env.example
@ -2,18 +2,35 @@
|
|||||||
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
|
||||||
WORKSPACE_TIMEZONE=Europe/Moscow
|
WORKSPACE_TIMEZONE=Europe/Moscow
|
||||||
|
|
||||||
|
WORKSPACE_LEGACY_COMPOSER_VERSION=1
|
||||||
|
WORKSPACE_LEGACY_NODE_VERSION=lts/fermium
|
||||||
|
WORKSPACE_COMPOSER_VERSION=2
|
||||||
|
WORKSPACE_NODE_VERSION=lts/hydrogen
|
||||||
|
|
||||||
|
WORKSPACE_PHP_OPT_MAX_EXECUTION_TIME=0
|
||||||
|
WORKSPACE_PHP_OPT_MEMORY_LIMIT=-1
|
||||||
|
|
||||||
|
WORKSPACE_INSTALL_SUPERVISOR=false
|
||||||
|
WORKSPACE_INSTALL_PYTHON=false
|
||||||
|
|
||||||
### PHP-FPM #############################################
|
### PHP-FPM #############################################
|
||||||
INSTALL_REDIS=true
|
PHP_OPT_SHORT_OPEN_TAG=Off
|
||||||
INSTALL_PEAR_MAIL=true
|
|
||||||
PHP_OPT_SHORT_OPEN_TAG=On
|
|
||||||
PHP_OPT_MAX_EXECUTION_TIME=600
|
PHP_OPT_MAX_EXECUTION_TIME=600
|
||||||
PHP_OPT_MEMORY_LIMIT=500M
|
PHP_OPT_MEMORY_LIMIT=256M
|
||||||
PHP_OPT_UPLOAD_MAX_FILESIZE=20M
|
PHP_OPT_POST_MAX_SIZE=800M
|
||||||
|
PHP_OPT_UPLOAD_MAX_FILESIZE=200M
|
||||||
|
|
||||||
### MINIO S3 #############################################
|
### MINIO S3 #############################################
|
||||||
MINIO_ACCESS_KEY=s3.local
|
MINIO_ACCESS_KEY=s3.local
|
||||||
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,4 +1,9 @@
|
|||||||
/.idea
|
/.idea
|
||||||
/dockerfiles/ypt-encoder
|
/dockerfiles/ypt-encoder
|
||||||
/docker-compose.yml
|
/docker-compose*
|
||||||
|
!/docker-compose.base.yml
|
||||||
|
!/docker-compose*.example
|
||||||
|
/docker-compose.nodejs.yml
|
||||||
/.env
|
/.env
|
||||||
|
/*.komodoproject
|
||||||
|
/config/nginx/includes.d/auth.passwd
|
51
README.md
51
README.md
@ -1,3 +1,20 @@
|
|||||||
|
# Prepare
|
||||||
|
|
||||||
|
Copy all example files and dir
|
||||||
|
|
||||||
|
Cop and set your username:
|
||||||
|
`.env.example`
|
||||||
|
|
||||||
|
Choose php version and redis needed redis containers
|
||||||
|
`docker-compose.yml.example`
|
||||||
|
|
||||||
|
`dockerfiles/workspace/crontab-example`
|
||||||
|
|
||||||
|
`dockerfiles/workspace/aliases.sh.example`
|
||||||
|
|
||||||
|
Set your site(s) root-mappings
|
||||||
|
`config/nginx/conf.d/vhosts.conf.example`
|
||||||
|
|
||||||
## First
|
## First
|
||||||
Create alias for `docker-compose` command.
|
Create alias for `docker-compose` command.
|
||||||
|
|
||||||
@ -41,11 +58,33 @@ After execute created symlinks, you have some enter-points for vulnerable popula
|
|||||||
### Xdebug
|
### Xdebug
|
||||||
For start debugging in php-fpm, also in workspace
|
For start debugging in php-fpm, also in workspace
|
||||||
|
|
||||||
`./start-xdebug.sh [74|73]` - `74` by default
|
`./xdebug-start.sh [74|81]` - `74` by default
|
||||||
|
|
||||||
For start debugging in php-fpm, also in workspace
|
For start debugging in php-fpm, also in workspace
|
||||||
|
|
||||||
`./stop-xdebug.sh` or `./stop-xdebug.sh 73` if you launch start with php-version 73
|
`./xdebug-stop.sh` or `./stop-xdebug.sh 81` if you launch start new php version 81
|
||||||
|
|
||||||
|
#### Xdebug with profiler
|
||||||
|
|
||||||
|
Profiler saved your profiles into `/tmp` directory in own container.
|
||||||
|
|
||||||
|
In docker-compose.base.yml exists volume that represent `/tmp` directory to `./data/profiler`.
|
||||||
|
In this case `./data/profiler` must be have `777` chmod`s.
|
||||||
|
|
||||||
|
For starting xdebug with profiler enable you might:
|
||||||
|
|
||||||
|
`./xdebug-start.sh 74 1`
|
||||||
|
|
||||||
|
Or
|
||||||
|
|
||||||
|
`./xdebug-start.sh 74 profiler` if you like
|
||||||
|
|
||||||
|
Second argument must be have any string
|
||||||
|
|
||||||
|
For disable profiler - just simple launch
|
||||||
|
|
||||||
|
`./xdebug-quit.sh`
|
||||||
|
|
||||||
|
|
||||||
### Mysql
|
### Mysql
|
||||||
|
|
||||||
@ -80,6 +119,14 @@ For restart `nginx` after some changes in nginx configuration, you might:
|
|||||||
|
|
||||||
`./restart-nginx.sh`
|
`./restart-nginx.sh`
|
||||||
|
|
||||||
|
### Elastic
|
||||||
|
|
||||||
|
Copy example
|
||||||
|
|
||||||
|
Launch:
|
||||||
|
|
||||||
|
`dc -f docker-compose.elastic.yml up -d elastic`
|
||||||
|
|
||||||
## Src build need DOCKER_BUILDKIT
|
## Src build need DOCKER_BUILDKIT
|
||||||
|
|
||||||
If you want build own workspace image. You need export environment variable
|
If you want build own workspace image. You need export environment variable
|
||||||
|
15
bash/_docker-cmd.sh
Normal file
15
bash/_docker-cmd.sh
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Grab OS type
|
||||||
|
if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
|
OS_TYPE="OSX"
|
||||||
|
else
|
||||||
|
OS_TYPE=$(expr substr $(uname -s) 1 5)
|
||||||
|
fi
|
||||||
|
|
||||||
|
DOCKER_CMD=docker
|
||||||
|
|
||||||
|
if [[ $OS_TYPE == "MINGW" ]]; then
|
||||||
|
DOCKER_CMD="winpty docker"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export DOCKER_CMD
|
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
|
15
bash/db-restart.sh
Executable file
15
bash/db-restart.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
||||||
|
|
||||||
|
. $DIR/bash/_docker-cmd.sh || {
|
||||||
|
echo "no docker cmd is presented" && exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
CONTAINER=$(docker ps | grep db | awk '{print $1}')
|
||||||
|
|
||||||
|
if [[ -z "${CONTAINER}" ]]; then
|
||||||
|
echo "Unable to find container: db"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
$DOCKER_CMD restart ${CONTAINER}
|
@ -6,4 +6,4 @@ if [[ -z "${CONTAINER}" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker exec -ti ${CONTAINER} mysqldump -u root -p123456 $1 | pv > $2
|
docker exec -ti ${CONTAINER} mariadb-dump -u root -p123456 $1
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
|
||||||
|
|
||||||
|
. $SCRIPT_DIR/_docker-cmd.sh || {
|
||||||
|
echo "no docker cmd is presented" && exit 1
|
||||||
|
}
|
||||||
|
|
||||||
PHP_VERSION=$1 # Without dot
|
PHP_VERSION=$1 # Without dot
|
||||||
|
|
||||||
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=74; fi
|
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=81; fi
|
||||||
|
|
||||||
CONTAINER=$(docker ps | grep workspace${PHP_VERSION} | awk '{print $1}')
|
CONTAINER=$(docker ps | grep workspace${PHP_VERSION} | awk '{print $1}')
|
||||||
|
|
||||||
@ -10,4 +16,4 @@ if [[ -z "${CONTAINER}" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker exec -ti ${CONTAINER} su laradock
|
$DOCKER_CMD exec -ti ${CONTAINER} su laradock
|
||||||
|
15
bash/mariadb.sh
Executable file
15
bash/mariadb.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
|
||||||
|
|
||||||
|
. $SCRIPT_DIR/_docker-cmd.sh || {
|
||||||
|
echo "no docker cmd is presented" && exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
CONTAINER=$(docker ps | grep mariadb | awk '{print $1}')
|
||||||
|
|
||||||
|
if [[ -z "${CONTAINER}" ]]; then
|
||||||
|
echo "Unable to find container: db"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
$DOCKER_CMD exec -ti ${CONTAINER} bash -c 'LANG=ru_RU.UTF-8 mariadb -u root -p123456'
|
@ -1,9 +1,29 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
CONTAINER=$(docker ps | grep db | awk '{print $1}')
|
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
|
||||||
|
|
||||||
|
. $SCRIPT_DIR/_docker-cmd.sh || {
|
||||||
|
echo "no docker cmd is presented" && exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
CONTAINER=$(docker ps | grep mariadb | awk '{print $1}')
|
||||||
|
|
||||||
if [[ -z "${CONTAINER}" ]]; then
|
if [[ -z "${CONTAINER}" ]]; then
|
||||||
echo "Unable to find container: db"
|
echo "Unable to find container: db"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker exec -ti ${CONTAINER} bash -c 'LANG=ru_RU.UTF-8 mysql -u root -p123456'
|
MYSQL_CMD='mysql -u root -p123456'
|
||||||
|
|
||||||
|
SQL_QUERY=$1
|
||||||
|
|
||||||
|
if [[ -n "${SQL_QUERY}" ]]; then
|
||||||
|
MYSQL_CMD="${MYSQL_CMD} -e \"${SQL_QUERY}\""
|
||||||
|
|
||||||
|
SELECTED_DB=$2
|
||||||
|
|
||||||
|
if [[ -n "${SELECTED_DB}" ]]; then
|
||||||
|
MYSQL_CMD="${MYSQL_CMD} \"${SELECTED_DB}\""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
$DOCKER_CMD exec -ti ${CONTAINER} bash -c "LANG=ru_RU.UTF-8 ${MYSQL_CMD}"
|
||||||
|
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,9 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
|
||||||
|
|
||||||
PHP_VERSION=$1 # Without dot
|
|
||||||
|
|
||||||
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=74; fi
|
|
||||||
|
|
||||||
${DIR}/dockerfiles/php-fpm/xdebug.sh stop ${PHP_VERSION}
|
|
||||||
${DIR}/dockerfiles/workspace/xdebug.sh stop ${PHP_VERSION}
|
|
@ -1,4 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
|
||||||
|
|
||||||
|
. $SCRIPT_DIR/_docker-cmd.sh || {
|
||||||
|
echo "no docker cmd is presented" && exit 1
|
||||||
|
}
|
||||||
|
|
||||||
CONTAINER=$(docker ps | grep nginx | awk '{print $1}')
|
CONTAINER=$(docker ps | grep nginx | awk '{print $1}')
|
||||||
|
|
||||||
if [[ -z "${CONTAINER}" ]]; then
|
if [[ -z "${CONTAINER}" ]]; then
|
||||||
@ -6,4 +12,4 @@ if [[ -z "${CONTAINER}" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker exec -ti ${CONTAINER} nginx -s reload
|
$DOCKER_CMD exec -ti ${CONTAINER} nginx -s reload
|
20
bash/root-onto-workspace.sh
Normal file
20
bash/root-onto-workspace.sh
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
|
||||||
|
|
||||||
|
. $SCRIPT_DIR/_docker-cmd.sh || {
|
||||||
|
echo "no docker cmd is presented" && exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
PHP_VERSION=$1 # Without dot
|
||||||
|
|
||||||
|
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=74; fi
|
||||||
|
|
||||||
|
CONTAINER=$(docker ps | grep workspace${PHP_VERSION} | awk '{print $1}')
|
||||||
|
|
||||||
|
|
||||||
|
if [[ -z "${CONTAINER}" ]]; then
|
||||||
|
echo "Unable to find container: workspace${PHP_VERSION}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
$DOCKER_CMD exec -ti ${CONTAINER}
|
@ -1,9 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
|
||||||
|
|
||||||
PHP_VERSION=$1 # Without dot
|
|
||||||
|
|
||||||
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=74; fi
|
|
||||||
|
|
||||||
${DIR}/dockerfiles/php-fpm/xdebug.sh start ${PHP_VERSION}
|
|
||||||
${DIR}/dockerfiles/workspace/xdebug.sh start ${PHP_VERSION}
|
|
11
bash/tail-db-general-log.sh
Executable file
11
bash/tail-db-general-log.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Not working on windows symlinks
|
||||||
|
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
||||||
|
|
||||||
|
GENERAL_LOG_FILE_PATH="${DIR}/log/mariadb/mariadb.log"
|
||||||
|
|
||||||
|
sudo truncate -s 0 $GENERAL_LOG_FILE_PATH
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
sudo tail -f $GENERAL_LOG_FILE_PATH | grep -Ev "(Close|Prepare)"
|
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
|
24
bash/update-composer.sh
Executable file
24
bash/update-composer.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
|
||||||
|
|
||||||
|
. $SCRIPT_DIR/_docker-cmd.sh || {
|
||||||
|
echo "no docker cmd is presented" && exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
PHP_VERSION=$1 # Without dot
|
||||||
|
COMPOSER_VERSION=$2
|
||||||
|
|
||||||
|
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=74; fi
|
||||||
|
|
||||||
|
CONTAINER=$(docker ps | grep workspace${PHP_VERSION} | awk '{print $1}')
|
||||||
|
|
||||||
|
if [[ -z "${CONTAINER}" ]]; then
|
||||||
|
echo "Unable to find container: workspace${PHP_VERSION}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${COMPOSER_VERSION}" ]]; then
|
||||||
|
COMPOSER_VERSION=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
$DOCKER_CMD exec -ti "${CONTAINER}" composer self-update --${COMPOSER_VERSION}
|
17
bash/xdebug-quit.sh
Executable file
17
bash/xdebug-quit.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Not working on windows symlinks
|
||||||
|
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
||||||
|
|
||||||
|
PHP_VERSION=$1 # Without dot
|
||||||
|
WITH_PROFILER=$2
|
||||||
|
|
||||||
|
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=81; fi
|
||||||
|
|
||||||
|
POSSIBLE_XDEBUG_VERSION=xdebug2
|
||||||
|
|
||||||
|
if [[ $PHP_VERSION -ge 81 ]]; then
|
||||||
|
POSSIBLE_XDEBUG_VERSION=xdebug3
|
||||||
|
fi
|
||||||
|
|
||||||
|
${DIR}/dockerfiles/php-fpm/${POSSIBLE_XDEBUG_VERSION}/xdebug.sh stop ${PHP_VERSION} ${WITH_PROFILER}
|
||||||
|
${DIR}/dockerfiles/workspace/xdebug.sh stop ${PHP_VERSION} ${WITH_PROFILER}
|
27
bash/xdebug-start.sh
Executable file
27
bash/xdebug-start.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Not working on windows symlinks
|
||||||
|
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
||||||
|
|
||||||
|
PHP_VERSION=$1 # Without dot
|
||||||
|
WITH_PROFILER=$2
|
||||||
|
|
||||||
|
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=81; fi
|
||||||
|
|
||||||
|
POSSIBLE_XDEBUG_VERSION=xdebug2
|
||||||
|
|
||||||
|
echo "Choice PHP_VERSION: $PHP_VERSION"
|
||||||
|
|
||||||
|
if [[ $PHP_VERSION -ge 81 ]]; then
|
||||||
|
POSSIBLE_XDEBUG_VERSION=xdebug3
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Choice POSSIBLE_XDEBUG_VERSION: $POSSIBLE_XDEBUG_VERSION"
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
||||||
|
${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}
|
||||||
|
|
||||||
|
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
|
2
config/mariadb/.gitignore
vendored
Normal file
2
config/mariadb/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*.cnf
|
||||||
|
*.cnf.disable
|
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
|
1
config/nginx/conf.d/.gitignore
vendored
1
config/nginx/conf.d/.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
*.conf
|
*.conf
|
||||||
|
*.conf.disable
|
@ -1,55 +1,65 @@
|
|||||||
upstream php73 {
|
#upstream php73 {
|
||||||
server php73:9000;
|
# server php73:9000;
|
||||||
}
|
#}
|
||||||
|
|
||||||
upstream php74 {
|
upstream php74 {
|
||||||
server php74:9000;
|
server php74:9000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
upstream php81 {
|
||||||
|
server php81:9000;
|
||||||
|
}
|
||||||
|
|
||||||
map $http_host $root {
|
map $http_host $root {
|
||||||
loc.octobercms /usr/share/nginx/html/someproject;
|
octobercms.local.wpstudio.ru /usr/share/nginx/html/someproject;
|
||||||
loc.wordpress /usr/share/nginx/html/someprojectwp;
|
wordpress.local.wpstudio.ru /usr/share/nginx/html/someprojectwp;
|
||||||
|
}
|
||||||
|
|
||||||
|
# @see https://github.com/OFFLINE-GmbH/oc-responsive-images-plugin/#responsive-images
|
||||||
|
map $http_accept $webp_suffix {
|
||||||
|
default "";
|
||||||
|
"~*webp" ".webp";
|
||||||
|
}
|
||||||
|
|
||||||
|
resolver 127.0.0.11;
|
||||||
|
|
||||||
|
map $http_host $uploads_upstream {
|
||||||
|
wordpress.local.wpstudio.ru "https://somewp.site";
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
server_name loc.octobercms;
|
listen 80 default;
|
||||||
listen 80;
|
|
||||||
root $root;
|
root $root;
|
||||||
#include global/auth.conf;
|
#include global/auth.conf;
|
||||||
#@see https://vcs.wpstudio.ru/wpstudio/nginx-examples
|
#@see https://vcs.wpstudio.ru/wpstudio/nginx-examples
|
||||||
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;
|
||||||
|
large_client_header_buffers 4 32k;
|
||||||
|
location ~ ^/index.php {
|
||||||
|
fastcgi_pass php81;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param SERVER_NAME $host;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name
|
||||||
|
some-php74-site.local.wpstudio.ru
|
||||||
|
;
|
||||||
|
root $root;
|
||||||
|
#include global/auth.conf;
|
||||||
|
#@see https://vcs.wpstudio.ru/wpstudio/nginx-examples
|
||||||
|
include includes.d/octobercms.conf;
|
||||||
|
include includes.d/staticfiles.conf;
|
||||||
|
client_max_body_size 300M;
|
||||||
location ~ ^/index.php {
|
location ~ ^/index.php {
|
||||||
fastcgi_pass php74;
|
fastcgi_pass php74;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
}
|
fastcgi_param SERVER_NAME $host;
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
server_name loc.wordpress;
|
|
||||||
listen 80;
|
|
||||||
root $root;
|
|
||||||
index index.html index.htm index.php;
|
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ /index.php?$args;
|
|
||||||
}
|
|
||||||
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
|
||||||
|
|
||||||
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
|
|
||||||
access_log off;
|
|
||||||
}
|
|
||||||
location ~ [^/]\.php(/|$) {
|
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
||||||
if (!-f $document_root$fastcgi_script_name) {
|
|
||||||
return 404;
|
|
||||||
}
|
|
||||||
include fastcgi_params;
|
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
||||||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
|
||||||
|
|
||||||
fastcgi_pass php73;
|
|
||||||
fastcgi_index index.php;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
24
config/nginx/conf.d/z-grav.conf.example
Normal file
24
config/nginx/conf.d/z-grav.conf.example
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
server {
|
||||||
|
server_name loc.wpstudio-new;
|
||||||
|
listen 80;
|
||||||
|
root $root;
|
||||||
|
index index.html index.htm index.php;
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
|
}
|
||||||
|
location ~ \.php$ {
|
||||||
|
fastcgi_pass php74;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
}
|
||||||
|
## Begin - Security
|
||||||
|
# deny all direct access for these folders
|
||||||
|
location ~* /(\.git|cache|bin|logs|backup|tests)/.*$ { return 403; }
|
||||||
|
# deny running scripts inside core system folders
|
||||||
|
location ~* /(system|vendor)/.*\.(txt|xml|md|html|yaml|yml|php|pl|py|cgi|twig|sh|bat|example)$ { return 403; }
|
||||||
|
# deny running scripts inside user folder
|
||||||
|
location ~* /user/.*\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
|
||||||
|
# deny access to specific files in the root folder
|
||||||
|
location ~ /(LICENSE\.txt|composer\.lock|composer\.json|nginx\.conf|web\.config|htaccess\.txt|\.htaccess) { return 403; }
|
||||||
|
## End - Security
|
||||||
|
}
|
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;
|
||||||
|
}
|
||||||
|
}
|
22
config/nginx/conf.d/z-octobercmswebp.conf.example
Normal file
22
config/nginx/conf.d/z-octobercmswebp.conf.example
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
server {
|
||||||
|
server_name
|
||||||
|
octobercmswebp.ru.local.wpstudio.ru
|
||||||
|
;
|
||||||
|
listen 80;
|
||||||
|
root $root;
|
||||||
|
include includes.d/octobercms.conf;
|
||||||
|
include includes.d/offline-webp.conf;
|
||||||
|
include includes.d/staticfiles.conf;
|
||||||
|
location = /index.php {
|
||||||
|
fastcgi_pass php74;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_read_timeout 3000;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
}
|
||||||
|
location = /plugins/offline/responsiveimages/webp.php {
|
||||||
|
fastcgi_pass php74;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_read_timeout 3000;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
}
|
||||||
|
}
|
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;
|
||||||
|
}
|
||||||
|
}
|
19
config/nginx/conf.d/z-s3.conf.example
Normal file
19
config/nginx/conf.d/z-s3.conf.example
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
server {
|
||||||
|
server_name s3.local;
|
||||||
|
ignore_invalid_headers off;
|
||||||
|
client_max_body_size 0;
|
||||||
|
proxy_buffering off;
|
||||||
|
location / {
|
||||||
|
proxy_pass http://minio:9000;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_connect_timeout 300;
|
||||||
|
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Connection "";
|
||||||
|
chunked_transfer_encoding off;
|
||||||
|
}
|
||||||
|
|
||||||
|
listen 80;
|
||||||
|
}
|
65
config/nginx/conf.d/z-wordpress.conf.example
Normal file
65
config/nginx/conf.d/z-wordpress.conf.example
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
server {
|
||||||
|
server_name
|
||||||
|
wp-with-file-proxy.local.wpstudio.ru
|
||||||
|
;
|
||||||
|
listen 80;
|
||||||
|
root $root;
|
||||||
|
index index.html index.htm index.php;
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$args;
|
||||||
|
}
|
||||||
|
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
||||||
|
location ~* ^/wp-content/uploads/.*$ {
|
||||||
|
expires max;
|
||||||
|
proxy_pass $uploads_upstream;
|
||||||
|
}
|
||||||
|
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
location ~ [^/]\.php(/|$) {
|
||||||
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
|
if (!-f $document_root$fastcgi_script_name) {
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
||||||
|
fastcgi_param SERVER_NAME $host;
|
||||||
|
|
||||||
|
fastcgi_pass php74;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_read_timeout 3000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
server_name
|
||||||
|
wp.local.wpstudio.ru
|
||||||
|
;
|
||||||
|
listen 80;
|
||||||
|
root $root;
|
||||||
|
index index.html index.htm index.php;
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$args;
|
||||||
|
}
|
||||||
|
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
||||||
|
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
location ~ [^/]\.php(/|$) {
|
||||||
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
|
if (!-f $document_root$fastcgi_script_name) {
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
||||||
|
fastcgi_param SERVER_NAME $host;
|
||||||
|
|
||||||
|
fastcgi_pass php74;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_read_timeout 3000;
|
||||||
|
}
|
||||||
|
}
|
41
config/nginx/conf.d/z-yii.conf.example
Normal file
41
config/nginx/conf.d/z-yii.conf.example
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
server {
|
||||||
|
server_name
|
||||||
|
yii.local.slave.dimti.ru
|
||||||
|
backend.yii.local.slave.dimti.ru
|
||||||
|
;
|
||||||
|
root $root;
|
||||||
|
set $yii_bootstrap "index.php";
|
||||||
|
charset utf-8;
|
||||||
|
location / {
|
||||||
|
index index.html $yii_bootstrap;
|
||||||
|
try_files $uri $uri/ /$yii_bootstrap?$args;
|
||||||
|
}
|
||||||
|
location ~ ^/(protected|framework|themes/\w+/views) {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
# отключаем обработку запросов фреймворком к несуществующим статичным файлам
|
||||||
|
location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
# передаем PHP-скрипт серверу FastCGI, прослушивающему адрес 127.0.0.1:9000
|
||||||
|
location ~ \.php {
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
||||||
|
# позволяем yii перехватывать запросы к несуществующим PHP-файлам
|
||||||
|
set $fsn /$yii_bootstrap;
|
||||||
|
if (-f $document_root$fastcgi_script_name){
|
||||||
|
set $fsn $fastcgi_script_name;
|
||||||
|
}
|
||||||
|
fastcgi_pass php74;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fsn;
|
||||||
|
# PATH_INFO и PATH_TRANSLATED могут быть опущены, но стандарт RFC 3875 определяет для CGI
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
fastcgi_param PATH_TRANSLATED $document_root$fsn;
|
||||||
|
}
|
||||||
|
# не позволять nginx отдавать файлы, начинающиеся с точки (.htaccess, .svn, .git и прочие)
|
||||||
|
location ~ /\. {
|
||||||
|
deny all;
|
||||||
|
access_log off;
|
||||||
|
log_not_found off;
|
||||||
|
}
|
||||||
|
}
|
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,52 +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
|
|
||||||
location ~ ^/favicon\.ico { try_files $uri /index.php; }
|
|
||||||
location ~ ^/sitemap\.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
|
## Let October handle if static file not exists
|
||||||
location ~ ^/storage/app/uploads/public { try_files $uri /404; }
|
|
||||||
location ~ ^/storage/app/media { try_files $uri /404; }
|
|
||||||
location ~ ^/storage/app/yml { try_files $uri /404; }
|
|
||||||
location ~ ^/files { try_files $uri /404; }
|
|
||||||
location ~ ^/storage/app/.*\.xls { try_files $uri /404; }
|
|
||||||
location ~ ^/storage/temp/public { try_files $uri /404; }
|
|
||||||
|
|
||||||
location ~ ^/modules/.*/assets { try_files $uri /404; }
|
location = /favicon.ico { try_files $uri /index.php; }
|
||||||
location ~ ^/modules/.*/resources { try_files $uri /404; }
|
location ~ ^/.*\.xml { try_files $uri /index.php; }
|
||||||
location ~ ^/modules/.*/behaviors/.*/assets { try_files $uri /404; }
|
location = /robots.txt { try_files $uri /index.php; }
|
||||||
location ~ ^/modules/.*/behaviors/.*/resources { try_files $uri /404; }
|
location = /humans.txt { try_files $uri /index.php; }
|
||||||
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; }
|
## Let nginx return 404 if static file not exists
|
||||||
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/.*/assets {
|
location /storage/app/uploads/public {
|
||||||
try_files $uri /404;
|
# add proxy cors headers
|
||||||
access_log off;
|
add_header Access-Control-Allow-Headers "*" always;
|
||||||
expires max;
|
add_header Access-Control-Allow-Methods "*" always;
|
||||||
}
|
add_header Access-Control-Allow-Origin "*" always;
|
||||||
location ~ ^/themes/.*/semantic { try_files $uri /404; }
|
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; }
|
||||||
|
8
config/nginx/includes.d/offline-webp.conf
Normal file
8
config/nginx/includes.d/offline-webp.conf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
location ~* \.(jpe?g|png)$ {
|
||||||
|
# @see https://github.com/OFFLINE-GmbH/oc-responsive-images-plugin/#responsive-images
|
||||||
|
add_header Vary Accept;
|
||||||
|
try_files $uri$webp_suffix @router;
|
||||||
|
}
|
||||||
|
location @router {
|
||||||
|
rewrite ^(.*)$ /plugins/offline/responsiveimages/webp.php?path=$uri;
|
||||||
|
}
|
@ -1,5 +1,23 @@
|
|||||||
rewrite "^(.*)\.(\d{10})\.(css|js)$" $1.$3 break;
|
#rewrite "^(.*)\.(\d{10})\.(css|js)$" $1.$3 break;
|
||||||
location ~* \.(jpg|jpeg|gif|png|svg|ico)$ {
|
location ~* \.(gif|svg|ico)$ {
|
||||||
|
access_log off;
|
||||||
|
expires max;
|
||||||
|
log_not_found off;
|
||||||
|
error_page 404 = /empty;
|
||||||
|
}
|
||||||
|
location ~* \.jpe?g$ {
|
||||||
|
access_log off;
|
||||||
|
expires max;
|
||||||
|
log_not_found off;
|
||||||
|
error_page 404 = /empty;
|
||||||
|
}
|
||||||
|
location ~* \.webp {
|
||||||
|
access_log off;
|
||||||
|
expires max;
|
||||||
|
log_not_found off;
|
||||||
|
error_page 404 = /empty;
|
||||||
|
}
|
||||||
|
location ~* \.png$ {
|
||||||
access_log off;
|
access_log off;
|
||||||
expires max;
|
expires max;
|
||||||
log_not_found off;
|
log_not_found off;
|
||||||
@ -9,7 +27,8 @@ location = /empty {
|
|||||||
expires 0;
|
expires 0;
|
||||||
empty_gif;
|
empty_gif;
|
||||||
}
|
}
|
||||||
location ~* \.(eot|ttf|woff|pdf|css|js)$ {
|
location ~* \.(eot|ttf|woff|woff2|otf|pdf|css|js|mp4)$ {
|
||||||
|
try_files $uri /404;
|
||||||
access_log off;
|
access_log off;
|
||||||
expires max;
|
expires max;
|
||||||
}
|
}
|
||||||
|
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,8 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
|
DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
|
||||||
|
|
||||||
ln -s ${DIR}/bash/start-xdebug.sh ${HOME}/
|
BASH_SCRIPTS_DIR="${DIR}/bash"
|
||||||
ln -s ${DIR}/bash/quit-xdebug.sh ${HOME}/
|
|
||||||
ln -s ${DIR}/bash/restart-nginx.sh ${HOME}/
|
BASH_SCRIPTS=(`ls $BASH_SCRIPTS_DIR`)
|
||||||
ln -s ${DIR}/bash/mysql.sh ${HOME}/
|
|
||||||
ln -s ${DIR}/bash/enter-to-workspace.sh ${HOME}/
|
for FILENAME in "${BASH_SCRIPTS[@]}"; do
|
||||||
|
BASH_SCRIPT_FILE_PATH="${BASH_SCRIPTS_DIR}/${FILENAME}"
|
||||||
|
SYMLINK_PATH="${HOME}/${FILENAME}"
|
||||||
|
|
||||||
|
if [[ ! -f "${SYMLINK_PATH}" ]]; then
|
||||||
|
ln -s "${BASH_SCRIPT_FILE_PATH}" "${SYMLINK_PATH}"
|
||||||
|
fi
|
||||||
|
done
|
@ -1,48 +1,51 @@
|
|||||||
version: '3.6'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx
|
image: nginx
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
|
||||||
default:
|
|
||||||
aliases:
|
|
||||||
- loc.10ballov
|
|
||||||
volumes:
|
volumes:
|
||||||
- ${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"
|
- "443:443"
|
||||||
expose:
|
php:
|
||||||
- 80
|
|
||||||
php-fpm:
|
|
||||||
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}
|
||||||
|
- PHP_OPT_POST_MAX_SIZE=${PHP_OPT_POST_MAX_SIZE}
|
||||||
- PHP_OPT_UPLOAD_MAX_FILESIZE=${PHP_OPT_UPLOAD_MAX_FILESIZE}
|
- PHP_OPT_UPLOAD_MAX_FILESIZE=${PHP_OPT_UPLOAD_MAX_FILESIZE}
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ${PROJECTS_DIR}:/usr/share/nginx/html
|
- ${PROJECTS_DIR}:/usr/share/nginx/html
|
||||||
expose:
|
- ./data/profiler:/tmp/profiler
|
||||||
- 9000
|
|
||||||
workspace:
|
workspace:
|
||||||
build:
|
build:
|
||||||
context: ./dockerfiles/workspace
|
context: ./dockerfiles/workspace
|
||||||
args:
|
args:
|
||||||
- PUID=${WORKSPACE_PUID}
|
- INSTALL_REDIS=${INSTALL_REDIS}
|
||||||
- PGID=${WORKSPACE_PGID}
|
- INSTALL_PEAR_MAIL=${INSTALL_PEAR_MAIL}
|
||||||
- TZ=${WORKSPACE_TIMEZONE}
|
- INSTALL_LIBREOFFICE=${INSTALL_LIBREOFFICE}
|
||||||
|
- CUSTOM_PUID=${WORKSPACE_PUID}
|
||||||
|
- CUSTOM_PGID=${WORKSPACE_PGID}
|
||||||
|
- CUSTOM_TZ=${WORKSPACE_TIMEZONE}
|
||||||
|
- PHP_OPT_SHORT_OPEN_TAG=${PHP_OPT_SHORT_OPEN_TAG}
|
||||||
|
- PHP_OPT_MAX_EXECUTION_TIME=${WORKSPACE_PHP_OPT_MAX_EXECUTION_TIME}
|
||||||
|
- 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:
|
||||||
@ -54,8 +57,13 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: 123456
|
MYSQL_ROOT_PASSWORD: 123456
|
||||||
ports:
|
volumes:
|
||||||
- "3306:3306"
|
- database:/var/lib/mysql
|
||||||
|
- ./hostfiles:/hostfiles
|
||||||
|
- ./log/mariadb:/var/log/mariadb
|
||||||
|
- ./config/mariadb:/etc/mysql/conf.d
|
||||||
|
security_opt:
|
||||||
|
- seccomp=unconfined
|
||||||
pma:
|
pma:
|
||||||
image: phpmyadmin/phpmyadmin
|
image: phpmyadmin/phpmyadmin
|
||||||
restart: always
|
restart: always
|
||||||
@ -63,23 +71,41 @@ services:
|
|||||||
PMA_HOST: db
|
PMA_HOST: db
|
||||||
PMA_USER: root
|
PMA_USER: root
|
||||||
PMA_PASSWORD: 123456
|
PMA_PASSWORD: 123456
|
||||||
ports:
|
inbucket:
|
||||||
- "81:80"
|
image: inbucket/inbucket
|
||||||
|
restart: always
|
||||||
|
expose:
|
||||||
|
- 2500
|
||||||
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:
|
||||||
# Must be copied into main docker-compose yml-file
|
build:
|
||||||
volumes:
|
context: ./dockerfiles/elastic
|
||||||
database:
|
restart: on-failure
|
||||||
|
environment:
|
||||||
secrets:
|
- discovery.type=single-node
|
||||||
user_ssh_key:
|
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||||
file: ~/.ssh/id_rsa
|
ulimits:
|
||||||
user_known_hosts:
|
memlock:
|
||||||
file: ~/.ssh/known_hosts
|
soft: -1
|
||||||
composer_auth:
|
hard: -1
|
||||||
file: ~/.composer/auth.json
|
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:
|
|
||||||
elasticsearch:
|
|
||||||
build:
|
|
||||||
context: ./dockerfiles/elasticsearch
|
|
||||||
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"
|
|
@ -1,23 +0,0 @@
|
|||||||
version: '3.6'
|
|
||||||
|
|
||||||
services:
|
|
||||||
elasticsearch732:
|
|
||||||
extends:
|
|
||||||
file: docker-compose.elasticsearch.base.yml
|
|
||||||
service: elasticsearch
|
|
||||||
build:
|
|
||||||
dockerfile: elastic732.Dockerfile
|
|
||||||
volumes:
|
|
||||||
- elastic732:/usr/share/elasticsearch/data
|
|
||||||
elasticsearch752:
|
|
||||||
extends:
|
|
||||||
file: docker-compose.elasticsearch.base.yml
|
|
||||||
service: elasticsearch
|
|
||||||
build:
|
|
||||||
dockerfile: elastic752.Dockerfile
|
|
||||||
volumes:
|
|
||||||
- elastic752:/usr/share/elasticsearch/data
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
elastic732:
|
|
||||||
elastic752:
|
|
15
docker-compose.elastic.yml.example
Executable file
15
docker-compose.elastic.yml.example
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
version: '3.6'
|
||||||
|
|
||||||
|
services:
|
||||||
|
elastic:
|
||||||
|
extends:
|
||||||
|
file: docker-compose.base.yml
|
||||||
|
service: elastic
|
||||||
|
restart: always
|
||||||
|
build:
|
||||||
|
dockerfile: elastic752.Dockerfile
|
||||||
|
volumes:
|
||||||
|
- elastic:/usr/share/elastic/data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
elastic:
|
@ -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
|
@ -9,11 +9,13 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- databasepg:/var/lib/postgresql/data
|
- databasepg:/var/lib/postgresql/data
|
||||||
- ./hostfiles:/hostfiles
|
- ./hostfiles:/hostfiles
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
adminer:
|
adminer:
|
||||||
image: adminer
|
image: adminer
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8081:8080
|
||||||
pgadmin:
|
pgadmin:
|
||||||
image: dpage/pgadmin4
|
image: dpage/pgadmin4
|
||||||
restart: always
|
restart: always
|
29
docker-compose.redis-ui.yml.example
Executable file
29
docker-compose.redis-ui.yml.example
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
version: '3.6'
|
||||||
|
|
||||||
|
services:
|
||||||
|
redis-ui:
|
||||||
|
image: marian/rebrow
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "5001:5001"
|
||||||
|
links:
|
||||||
|
- redis-example:redis-example
|
||||||
|
redis-stack:
|
||||||
|
image: redis/redis-stack:latest
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "8001:8001"
|
||||||
|
expose:
|
||||||
|
- 6379
|
||||||
|
redis-commander:
|
||||||
|
container_name: redis-commander
|
||||||
|
hostname: redis-commander
|
||||||
|
image: ghcr.io/joeferner/redis-commander:latest
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- REDIS_HOSTS=intai:redis-intai:6379
|
||||||
|
ports:
|
||||||
|
- "8081:8081"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
elastic:
|
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,58 +1,76 @@
|
|||||||
version: '3.6'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
nginx:
|
nginx:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
service: nginx
|
service: nginx
|
||||||
php73:
|
networks:
|
||||||
extends:
|
default:
|
||||||
file: docker-compose.base.yml
|
aliases:
|
||||||
service: php-fpm
|
- someproject.local.wpstudio.ru
|
||||||
build:
|
depends_on:
|
||||||
dockerfile: php73.Dockerfile
|
- php74
|
||||||
|
- php81
|
||||||
php74:
|
php74:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
service: php-fpm
|
service: php
|
||||||
build:
|
build:
|
||||||
dockerfile: php74.Dockerfile
|
dockerfile: php74.Dockerfile
|
||||||
workspace73:
|
php81:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
service: workspace
|
service: php
|
||||||
build:
|
build:
|
||||||
dockerfile: workspace73.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
|
||||||
service: workspace
|
service: workspace
|
||||||
build:
|
build:
|
||||||
dockerfile: workspace74.Dockerfile
|
dockerfile: workspace74.Dockerfile
|
||||||
|
workspace81:
|
||||||
|
extends:
|
||||||
|
file: docker-compose.base.yml
|
||||||
|
service: workspace
|
||||||
|
build:
|
||||||
|
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
|
||||||
service: db
|
service: db
|
||||||
volumes:
|
|
||||||
- database:/var/lib/mysql
|
|
||||||
- ./hostfiles:/hostfiles
|
|
||||||
pma:
|
pma:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
service: pma
|
service: pma
|
||||||
redis:
|
ports:
|
||||||
|
- "81:80"
|
||||||
|
inbucket:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
service: redis
|
service: inbucket
|
||||||
redis-salvoterra:
|
ports:
|
||||||
extends:
|
- "82:9000"
|
||||||
file: docker-compose.base.yml
|
dnsmasq:
|
||||||
service: redis
|
restart: always
|
||||||
restart: on-failure
|
build:
|
||||||
redis-allislam:
|
context: ./dockerfiles/dnsmasq
|
||||||
extends:
|
volumes:
|
||||||
file: docker-compose.base.yml
|
- ./config/dnsmasq/dnsmasq.conf:/etc/dnsmasq.conf
|
||||||
service: redis
|
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"]
|
3
dockerfiles/elastic/elastic732.Dockerfile
Normal file
3
dockerfiles/elastic/elastic732.Dockerfile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
FROM docker.elastic.co/elasticsearch/elasticsearch:7.3.2
|
||||||
|
|
||||||
|
RUN elasticsearch-plugin install analysis-icu
|
7
dockerfiles/elastic/elastic752.Dockerfile
Normal file
7
dockerfiles/elastic/elastic752.Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM elasticsearch:7.5.2
|
||||||
|
|
||||||
|
COPY ./plugins /plugins
|
||||||
|
|
||||||
|
RUN elasticsearch-plugin install file:///plugins/analysis-icu-7.5.2.zip
|
||||||
|
|
||||||
|
RUN rm -rf /plugins
|
BIN
dockerfiles/elastic/plugins/analysis-icu-7.5.2.zip
Normal file
BIN
dockerfiles/elastic/plugins/analysis-icu-7.5.2.zip
Normal file
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
RUN elasticsearch-plugin install analysis-icu
|
|
@ -1,4 +0,0 @@
|
|||||||
# syntax = edrevo/dockerfile-plus
|
|
||||||
FROM docker.elastic.co/elasticsearch/elasticsearch:7.3.2
|
|
||||||
|
|
||||||
INCLUDE+ ./elastic.base.Dockerfile
|
|
@ -1,4 +0,0 @@
|
|||||||
# syntax = edrevo/dockerfile-plus
|
|
||||||
FROM docker.elastic.co/elasticsearch/elasticsearch:7.5.2
|
|
||||||
|
|
||||||
INCLUDE+ ./elastic.base.Dockerfile
|
|
43
dockerfiles/php-fpm/php56.Dockerfile
Normal file
43
dockerfiles/php-fpm/php56.Dockerfile
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
FROM dimti/php:5.6
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# 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 ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Permission denied on /tmp folder:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
RUN chmod 1777 /tmp
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# 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"
|
@ -26,27 +26,37 @@ RUN if [ ${INSTALL_PEAR_MAIL} = true ]; then \
|
|||||||
;fi
|
;fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
# xDebug (termporary):
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
# Copy xdebug configuration for remote debugging
|
||||||
|
COPY ./xdebug2/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# НУЦ:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
RUN mkdir /usr/local/share/ca-certificates/extra && \
|
||||||
|
cd /usr/local/share/ca-certificates/extra && \
|
||||||
|
curl -O https://gu-st.ru/content/lending/russian_trusted_root_ca_pem.crt && \
|
||||||
|
curl -O https://gu-st.ru/content/lending/russian_trusted_sub_ca_pem.crt && \
|
||||||
|
update-ca-certificates
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
# Tune opts:
|
# Tune opts:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
ARG PHP_OPT_SHORT_OPEN_TAG=Off
|
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"
|
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=30
|
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"
|
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=128M
|
ARG PHP_OPT_MEMORY_LIMIT=256M
|
||||||
RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" "$PHP_INI_DIR/php.ini"
|
RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
ARG PHP_OPT_UPLOAD_MAX_FILESIZE=2M
|
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"
|
RUN sed -i "s/^upload_max_filesize = .*/upload_max_filesize = $PHP_OPT_UPLOAD_MAX_FILESIZE/g" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
###########################################################################
|
|
||||||
# Locales:
|
|
||||||
###########################################################################
|
|
||||||
|
|
||||||
RUN apt update && \
|
|
||||||
apt install -y locales && \
|
|
||||||
sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
|
||||||
sed -i 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && \
|
|
||||||
locale-gen
|
|
||||||
|
66
dockerfiles/php-fpm/php81.Dockerfile
Normal file
66
dockerfiles/php-fpm/php81.Dockerfile
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
FROM dimti/php:8.1
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# 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
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# 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:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
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"
|
@ -1,4 +1,4 @@
|
|||||||
FROM dimti/php:7.3
|
FROM dimti/php:8.2
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Redis and igbinary:
|
# Redis and igbinary:
|
||||||
@ -26,27 +26,33 @@ RUN if [ ${INSTALL_PEAR_MAIL} = true ]; then \
|
|||||||
;fi
|
;fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
# xDebug (termporary):
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
# Copy xdebug configuration for remote debugging
|
||||||
|
COPY ./xdebug3/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
# Tune opts:
|
# Tune opts:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
ARG PHP_OPT_SHORT_OPEN_TAG=Off
|
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"
|
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=30
|
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"
|
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=128M
|
ARG PHP_OPT_MEMORY_LIMIT=256M
|
||||||
RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" "$PHP_INI_DIR/php.ini"
|
RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
ARG PHP_OPT_UPLOAD_MAX_FILESIZE=2M
|
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"
|
RUN sed -i "s/^upload_max_filesize = .*/upload_max_filesize = $PHP_OPT_UPLOAD_MAX_FILESIZE/g" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Locales:
|
# Libreoffice:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt-get update && apt-get install -y libreoffice-nogui --no-install-recommends && apt-get clean
|
||||||
apt install -y locales && \
|
|
||||||
sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
|
||||||
sed -i 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && \
|
|
||||||
locale-gen
|
|
@ -1,106 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
# NOTE: At the moment, this has only been confirmed to work with PHP 7
|
|
||||||
|
|
||||||
PHP_VERSION=$2 # Without dot
|
|
||||||
|
|
||||||
# Grab full name of php-fpm container
|
|
||||||
PHP_FPM_CONTAINER=$(docker ps | grep php${PHP_VERSION} | awk '{print $1}')
|
|
||||||
|
|
||||||
if [[ -z "${PHP_FPM_CONTAINER}" ]]; then
|
|
||||||
echo "Unable to find php fpm container: php${PHP_VERSION}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Grab OS type
|
|
||||||
if [[ "$(uname)" == "Darwin" ]]; then
|
|
||||||
OS_TYPE="OSX"
|
|
||||||
else
|
|
||||||
OS_TYPE=$(expr substr $(uname -s) 1 5)
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
xdebug_status ()
|
|
||||||
{
|
|
||||||
echo 'xDebug status'
|
|
||||||
|
|
||||||
# If running on Windows, need to prepend with winpty :(
|
|
||||||
if [[ $OS_TYPE == "MINGW" ]]; then
|
|
||||||
winpty docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
|
|
||||||
|
|
||||||
else
|
|
||||||
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
xdebug_start ()
|
|
||||||
{
|
|
||||||
echo 'Start xDebug'
|
|
||||||
|
|
||||||
# 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"
|
|
||||||
|
|
||||||
|
|
||||||
# If running on Windows, need to prepend with winpty :(
|
|
||||||
if [[ $OS_TYPE == "MINGW" ]]; then
|
|
||||||
winpty docker exec -it $PHP_FPM_CONTAINER bash -c "${ON_CMD}"
|
|
||||||
docker restart $PHP_FPM_CONTAINER
|
|
||||||
winpty docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
|
|
||||||
|
|
||||||
else
|
|
||||||
docker exec -it $PHP_FPM_CONTAINER bash -c "${ON_CMD}"
|
|
||||||
docker restart $PHP_FPM_CONTAINER
|
|
||||||
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
xdebug_stop ()
|
|
||||||
{
|
|
||||||
echo 'Stop xDebug'
|
|
||||||
|
|
||||||
# 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"
|
|
||||||
|
|
||||||
|
|
||||||
# If running on Windows, need to prepend with winpty :(
|
|
||||||
if [[ $OS_TYPE == "MINGW" ]]; then
|
|
||||||
# This is the equivalent of:
|
|
||||||
# winpty docker exec -it laradock_php-fpm_1 bash -c 'bla bla bla'
|
|
||||||
# Thanks to @michaelarnauts at https://github.com/docker/compose/issues/593
|
|
||||||
winpty docker exec -it $PHP_FPM_CONTAINER bash -c "${OFF_CMD}"
|
|
||||||
docker restart $PHP_FPM_CONTAINER
|
|
||||||
#docker-compose restart php-fpm
|
|
||||||
winpty docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
|
|
||||||
|
|
||||||
else
|
|
||||||
docker exec -it $PHP_FPM_CONTAINER bash -c "${OFF_CMD}"
|
|
||||||
# docker-compose restart php-fpm
|
|
||||||
docker restart $PHP_FPM_CONTAINER
|
|
||||||
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
stop|STOP)
|
|
||||||
xdebug_stop
|
|
||||||
;;
|
|
||||||
start|START)
|
|
||||||
xdebug_start
|
|
||||||
;;
|
|
||||||
status|STATUS)
|
|
||||||
xdebug_status
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "xDebug [Stop | Start | Status] in the ${PHP_FPM_CONTAINER} container."
|
|
||||||
echo "xDebug must have already been installed."
|
|
||||||
echo "Usage:"
|
|
||||||
echo " .php-fpm/xdebug.sh 73|74 stop|start|status"
|
|
||||||
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 1
|
|
@ -1,16 +1,16 @@
|
|||||||
; NOTE: The actual debug.so extention is NOT SET HERE but rather (/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini)
|
; NOTE: The actual xdebug.so extention is NOT SET HERE but rather (/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini)
|
||||||
|
|
||||||
;xdebug.remote_host=dockerhost
|
;xdebug.remote_host=dockerhost
|
||||||
xdebug.remote_connect_back=1
|
xdebug.remote_connect_back=1
|
||||||
xdebug.remote_port=9000
|
xdebug.remote_port=9000
|
||||||
xdebug.idekey=PHPSTORM
|
xdebug.idekey=PHPSTORM
|
||||||
|
|
||||||
xdebug.remote_autostart=0
|
xdebug.remote_autostart=1
|
||||||
xdebug.remote_enable=0
|
xdebug.remote_enable=1
|
||||||
xdebug.cli_color=0
|
xdebug.cli_color=0
|
||||||
xdebug.profiler_enable=1
|
xdebug.profiler_enable=1
|
||||||
xdebug.profiler_enable_trigger=1
|
xdebug.profiler_enable_trigger=1
|
||||||
xdebug.profiler_output_dir=/tmp
|
xdebug.profiler_output_dir=/tmp/profiler
|
||||||
|
|
||||||
xdebug.remote_handler=dbgp
|
xdebug.remote_handler=dbgp
|
||||||
xdebug.remote_mode=req
|
xdebug.remote_mode=req
|
||||||
@ -20,6 +20,7 @@ xdebug.var_display_max_data=-1
|
|||||||
xdebug.var_display_max_depth=-1
|
xdebug.var_display_max_depth=-1
|
||||||
|
|
||||||
xdebug.trace_enable_trigger=1
|
xdebug.trace_enable_trigger=1
|
||||||
xdebug.trace_output_dir=/tmp
|
xdebug.trace_output_dir=/tmp/trace
|
||||||
xdebug.trace_output_name="trace.%t"
|
xdebug.trace_output_name="trace.%t"
|
||||||
|
|
||||||
|
xdebug.show_exception_trace=1
|
87
dockerfiles/php-fpm/xdebug2/xdebug.sh
Executable file
87
dockerfiles/php-fpm/xdebug2/xdebug.sh
Executable file
@ -0,0 +1,87 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
# NOTE: At the moment, this has only been confirmed to work with PHP 7
|
||||||
|
|
||||||
|
PHP_VERSION=$2 # Without dot
|
||||||
|
WITH_PROFILER=$3
|
||||||
|
|
||||||
|
# Grab full name of php-fpm container
|
||||||
|
PHP_FPM_CONTAINER=$(docker ps | grep php${PHP_VERSION} | awk '{print $1}')
|
||||||
|
|
||||||
|
if [[ -z "${PHP_FPM_CONTAINER}" ]]; then
|
||||||
|
echo "Unable to find php fpm container: php${PHP_VERSION}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -z "${WITH_PROFILER}" ]]; then
|
||||||
|
echo "With profiler option".
|
||||||
|
fi
|
||||||
|
|
||||||
|
xdebug_status ()
|
||||||
|
{
|
||||||
|
echo 'xDebug status'
|
||||||
|
|
||||||
|
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
xdebug_start ()
|
||||||
|
{
|
||||||
|
echo 'Start xDebug2'
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
REMOTE_AUTOSTART_CMD="sed -i 's/^xdebug.remote_autostart=0/xdebug.remote_autostart=1/g' /usr/local/etc/php/conf.d/xdebug.ini"
|
||||||
|
REMOTE_ENABLE_CMD="sed -i 's/^xdebug.remote_enable=0/xdebug.remote_enable=1/g' /usr/local/etc/php/conf.d/xdebug.ini"
|
||||||
|
PROFILER_ENABLE_CDM="sed -i 's/^xdebug.profiler_enable=0/xdebug.profiler_enable=1/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 "${REMOTE_AUTOSTART_CMD}"
|
||||||
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${REMOTE_ENABLE_CMD}"
|
||||||
|
if [[ ! -z "${WITH_PROFILER}" ]]; then
|
||||||
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${PROFILER_ENABLE_CDM}"
|
||||||
|
fi
|
||||||
|
docker restart $PHP_FPM_CONTAINER
|
||||||
|
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
xdebug_stop ()
|
||||||
|
{
|
||||||
|
echo 'Stop xDebug2'
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
REMOTE_AUTOSTART_CMD="sed -i 's/^xdebug.remote_autostart=1/xdebug.remote_autostart=0/g' /usr/local/etc/php/conf.d/xdebug.ini"
|
||||||
|
REMOTE_ENABLE_CMD="sed -i 's/^xdebug.remote_enable=1/xdebug.remote_enable=0/g' /usr/local/etc/php/conf.d/xdebug.ini"
|
||||||
|
PROFILER_DISABLE_CMD="sed -i 's/^xdebug.profiler_enable=1/xdebug.profiler_enable=0/g' /usr/local/etc/php/conf.d/xdebug.ini"
|
||||||
|
|
||||||
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${OFF_CMD}"
|
||||||
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${REMOTE_AUTOSTART_CMD}"
|
||||||
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${REMOTE_ENABLE_CMD}"
|
||||||
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${PROFILER_DISABLE_CMD}"
|
||||||
|
# docker-compose restart php-fpm
|
||||||
|
docker restart $PHP_FPM_CONTAINER
|
||||||
|
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
stop|STOP)
|
||||||
|
xdebug_stop
|
||||||
|
;;
|
||||||
|
start|START)
|
||||||
|
xdebug_start
|
||||||
|
;;
|
||||||
|
status|STATUS)
|
||||||
|
xdebug_status
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "xDebug [Stop | Start | Status] in the ${PHP_FPM_CONTAINER} container."
|
||||||
|
echo "xDebug must have already been installed."
|
||||||
|
echo "Usage:"
|
||||||
|
echo " .php-fpm/xdebug.sh 73|74 stop|start|status"
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 1
|
4
dockerfiles/php-fpm/xdebug3/xdebug.ini
Normal file
4
dockerfiles/php-fpm/xdebug3/xdebug.ini
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
xdebug.mode=off
|
||||||
|
xdebug.discover_client_host=1
|
||||||
|
xdebug.start_with_request=yes
|
||||||
|
xdebug.output_dir=/tmp/profiler
|
84
dockerfiles/php-fpm/xdebug3/xdebug.sh
Executable file
84
dockerfiles/php-fpm/xdebug3/xdebug.sh
Executable file
@ -0,0 +1,84 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
# NOTE: At the moment, this has only been confirmed to work with PHP 7
|
||||||
|
|
||||||
|
PHP_VERSION=$2 # Without dot
|
||||||
|
WITH_PROFILER=$3
|
||||||
|
|
||||||
|
# Grab full name of php-fpm container
|
||||||
|
PHP_FPM_CONTAINER=$(docker ps | grep php${PHP_VERSION} | awk '{print $1}')
|
||||||
|
|
||||||
|
if [[ -z "${PHP_FPM_CONTAINER}" ]]; then
|
||||||
|
echo "Unable to find php fpm container: php${PHP_VERSION}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -z "${WITH_PROFILER}" ]]; then
|
||||||
|
echo "With profiler option".
|
||||||
|
fi
|
||||||
|
|
||||||
|
xdebug_status ()
|
||||||
|
{
|
||||||
|
echo 'xDebug status'
|
||||||
|
|
||||||
|
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
xdebug_start ()
|
||||||
|
{
|
||||||
|
echo 'Start xDebug3'
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
|
||||||
|
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 "${MODE_DEBUG_CMD}"
|
||||||
|
docker restart $PHP_FPM_CONTAINER
|
||||||
|
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
xdebug_stop ()
|
||||||
|
{
|
||||||
|
echo 'Stop xDebug3'
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
MODE_OFF_CMD="sed -i 's/^xdebug.mode.*/xdebug.mode=off/g' /usr/local/etc/php/conf.d/xdebug.ini"
|
||||||
|
|
||||||
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${OFF_CMD}"
|
||||||
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${MODE_OFF_CMD}"
|
||||||
|
# docker-compose restart php-fpm
|
||||||
|
docker restart $PHP_FPM_CONTAINER
|
||||||
|
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
stop|STOP)
|
||||||
|
xdebug_stop
|
||||||
|
;;
|
||||||
|
start|START)
|
||||||
|
xdebug_start
|
||||||
|
;;
|
||||||
|
status|STATUS)
|
||||||
|
xdebug_status
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "xDebug [Stop | Start | Status] in the ${PHP_FPM_CONTAINER} container."
|
||||||
|
echo "xDebug must have already been installed."
|
||||||
|
echo "Usage:"
|
||||||
|
echo " .php-fpm/xdebug.sh 73|74 stop|start|status"
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 1
|
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
Normal file
3
dockerfiles/workspace/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/.bash_*
|
||||||
|
!/.bash_.example
|
||||||
|
/crontab
|
@ -1 +0,0 @@
|
|||||||
#* * * * * laradock /usr/bin/php /var/www/artisan schedule:run >> /dev/null 2>&1
|
|
@ -1,47 +0,0 @@
|
|||||||
FROM dimti/workspace:7.3
|
|
||||||
|
|
||||||
###########################################################################
|
|
||||||
# Laradock non-root user:
|
|
||||||
###########################################################################
|
|
||||||
|
|
||||||
ARG PUID=1000
|
|
||||||
ENV PUID ${PUID}
|
|
||||||
ARG PGID=1000
|
|
||||||
ENV PGID ${PGID}
|
|
||||||
|
|
||||||
RUN usermod -u ${PUID} laradock && groupmod -g ${PGID} laradock
|
|
||||||
|
|
||||||
RUN chown -R ${PUID}:${PGID} /home/laradock
|
|
||||||
|
|
||||||
###########################################################################
|
|
||||||
# Set Timezone
|
|
||||||
###########################################################################
|
|
||||||
|
|
||||||
ARG TZ=Europe/Moscow
|
|
||||||
ENV TZ ${TZ}
|
|
||||||
|
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
||||||
|
|
||||||
###########################################################################
|
|
||||||
# Additional PHP-extensions:
|
|
||||||
###########################################################################
|
|
||||||
|
|
||||||
RUN pecl install -a redis
|
|
||||||
|
|
||||||
###########################################################################
|
|
||||||
# S3 config
|
|
||||||
###########################################################################
|
|
||||||
|
|
||||||
USER laradock
|
|
||||||
|
|
||||||
COPY ./minio/auth.json /home/laradock/.mc/config.json
|
|
||||||
|
|
||||||
###########################################################################
|
|
||||||
# Crontab
|
|
||||||
###########################################################################
|
|
||||||
|
|
||||||
USER root
|
|
||||||
|
|
||||||
COPY ./crontab73 /etc/cron.d
|
|
||||||
|
|
||||||
RUN chmod -R 644 /etc/cron.d
|
|
@ -1,26 +1,28 @@
|
|||||||
FROM dimti/workspace:7.4
|
FROM dimti/workspace:7.4
|
||||||
|
|
||||||
|
ARG PHP_VERSION=7.4
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Laradock non-root user:
|
# Laradock non-root user:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
ARG PUID=1000
|
ARG CUSTOM_PUID=1000
|
||||||
ENV PUID ${PUID}
|
ENV PUID ${CUSTOM_PUID}
|
||||||
ARG PGID=1000
|
ARG CUSTOM_PGID=1000
|
||||||
ENV PGID ${PGID}
|
ENV PGID ${CUSTOM_PGID}
|
||||||
|
|
||||||
RUN usermod -u ${PUID} laradock && groupmod -g ${PGID} laradock
|
RUN usermod -u ${CUSTOM_PUID} laradock && groupmod -g ${CUSTOM_PGID} laradock
|
||||||
|
|
||||||
RUN chown -R ${PUID}:${PGID} /home/laradock
|
RUN chown -R ${CUSTOM_PUID}:${CUSTOM_PGID} /home/laradock
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Set Timezone
|
# Set Timezone
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
ARG TZ=Europe/Moscow
|
ARG CUSTOM_TZ=Europe/Moscow
|
||||||
ENV TZ ${TZ}
|
ENV TZ ${CUSTOM_TZ}
|
||||||
|
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
RUN ln -snf /usr/share/zoneinfo/$CUSTOM_TZ /etc/localtime && echo $CUSTOM_TZ > /etc/timezone
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Additional PHP-extensions:
|
# Additional PHP-extensions:
|
||||||
@ -29,6 +31,8 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|||||||
#RUN pecl install igbinary && pecl install -a redis
|
#RUN pecl install igbinary && pecl install -a redis
|
||||||
RUN 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
|
# S3 config
|
||||||
###########################################################################
|
###########################################################################
|
||||||
@ -38,11 +42,130 @@ USER laradock
|
|||||||
COPY ./minio/auth.json /home/laradock/.mc/config.json
|
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=1
|
||||||
|
ENV COMPOSER_VERSION ${COMPOSER_VERSION}
|
||||||
|
RUN composer self-update # Need for correctly update to actual old branch
|
||||||
|
RUN composer self-update --${COMPOSER_VERSION}
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# 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
|
||||||
|
|
||||||
|
RUN yadm clone --bootstrap https://vcs.wpstudio.ru/gitea/dotfiles.git
|
||||||
|
|
||||||
|
RUN sed -i 's/#/\\$/g' ${HOME}/.config/starship.toml
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# 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:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
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
|
# Crontab
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
COPY ./crontab74 /etc/cron.d
|
# Clean up
|
||||||
|
RUN apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
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"]
|
127
dockerfiles/workspace/workspace81.Dockerfile
Normal file
127
dockerfiles/workspace/workspace81.Dockerfile
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
FROM dimti/workspace:8.1
|
||||||
|
|
||||||
|
ARG PHP_VERSION=8.1
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# 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:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_REDIS=false
|
||||||
|
|
||||||
|
#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
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
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
|
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
|
@ -3,6 +3,7 @@
|
|||||||
# NOTE: At the moment, this has only been confirmed to work with PHP 7
|
# NOTE: At the moment, this has only been confirmed to work with PHP 7
|
||||||
|
|
||||||
PHP_VERSION=$2 # Without dot
|
PHP_VERSION=$2 # Without dot
|
||||||
|
WITH_PROFILER=$3
|
||||||
|
|
||||||
# Grab full name of workspace container
|
# Grab full name of workspace container
|
||||||
WORKSPACE_CONTAINER=$(docker ps | grep workspace${PHP_VERSION} | awk '{print $1}')
|
WORKSPACE_CONTAINER=$(docker ps | grep workspace${PHP_VERSION} | awk '{print $1}')
|
||||||
@ -12,26 +13,15 @@ if [[ -z "${WORKSPACE_CONTAINER}" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Grab OS type
|
if [[ ! -z "${WITH_PROFILER}" ]]; then
|
||||||
if [[ "$(uname)" == "Darwin" ]]; then
|
echo "With profiler option".
|
||||||
OS_TYPE="OSX"
|
|
||||||
else
|
|
||||||
OS_TYPE=$(expr substr $(uname -s) 1 5)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
xdebug_status ()
|
xdebug_status ()
|
||||||
{
|
{
|
||||||
echo 'xDebug status'
|
echo 'xDebug status'
|
||||||
|
|
||||||
# If running on Windows, need to prepend with winpty :(
|
docker exec -it $WORKSPACE_CONTAINER bash -c 'php -v'
|
||||||
if [[ $OS_TYPE == "MINGW" ]]; then
|
|
||||||
winpty docker exec -it $WORKSPACE_CONTAINER bash -c 'php -v'
|
|
||||||
|
|
||||||
else
|
|
||||||
docker exec -it $WORKSPACE_CONTAINER bash -c 'php -v'
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -40,21 +30,13 @@ xdebug_start ()
|
|||||||
echo 'Start xDebug'
|
echo 'Start xDebug'
|
||||||
|
|
||||||
# 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' \
|
ON_CMD='sed -i "s/^;zend_extension=/zend_extension=/g" /etc/php/$PHP_VERSION/cli/conf.d/20-xdebug.ini'
|
||||||
/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
|
|
||||||
|
|
||||||
|
docker exec -it $WORKSPACE_CONTAINER bash -c "${ON_CMD}"
|
||||||
|
docker exec -it $WORKSPACE_CONTAINER bash -c 'php -v'
|
||||||
|
|
||||||
# If running on Windows, need to prepend with winpty :(
|
echo 'In cli use this for resolve hostname for debugger in your IDE:'
|
||||||
if [[ $OS_TYPE == "MINGW" ]]; then
|
echo 'export PHP_IDE_CONFIG="serverName=loc.mydomain.ru"'
|
||||||
winpty docker exec -it $WORKSPACE_CONTAINER bash -c "${ON_CMD}"
|
|
||||||
docker restart $WORKSPACE_CONTAINER
|
|
||||||
winpty docker exec -it $WORKSPACE_CONTAINER bash -c 'php -v'
|
|
||||||
|
|
||||||
else
|
|
||||||
docker exec -it $WORKSPACE_CONTAINER bash -c "${ON_CMD}"
|
|
||||||
docker restart $WORKSPACE_CONTAINER
|
|
||||||
docker exec -it $WORKSPACE_CONTAINER bash -c 'php -v'
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -63,25 +45,10 @@ xdebug_stop ()
|
|||||||
echo 'Stop xDebug'
|
echo 'Stop xDebug'
|
||||||
|
|
||||||
# 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" /etc/php/$PHP_VERSION/cli/conf.d/20-xdebug.ini'
|
||||||
|
|
||||||
|
docker exec -it $WORKSPACE_CONTAINER bash -c "${OFF_CMD}"
|
||||||
# If running on Windows, need to prepend with winpty :(
|
docker exec -it $WORKSPACE_CONTAINER bash -c 'php -v'
|
||||||
if [[ $OS_TYPE == "MINGW" ]]; then
|
|
||||||
# This is the equivalent of:
|
|
||||||
# winpty docker exec -it laradock_php-fpm_1 bash -c 'bla bla bla'
|
|
||||||
# Thanks to @michaelarnauts at https://github.com/docker/compose/issues/593
|
|
||||||
winpty docker exec -it $WORKSPACE_CONTAINER bash -c "${OFF_CMD}"
|
|
||||||
docker restart $WORKSPACE_CONTAINER
|
|
||||||
#docker-compose restart php-fpm
|
|
||||||
winpty docker exec -it $WORKSPACE_CONTAINER bash -c 'php -v'
|
|
||||||
|
|
||||||
else
|
|
||||||
docker exec -it $WORKSPACE_CONTAINER bash -c "${OFF_CMD}"
|
|
||||||
# docker-compose restart php-fpm
|
|
||||||
docker restart $WORKSPACE_CONTAINER
|
|
||||||
docker exec -it $WORKSPACE_CONTAINER bash -c 'php -v'
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
FILE=${HOME}/.config/composer/auth.json
|
#FILE=${HOME}/.config/composer/auth.json
|
||||||
|
#
|
||||||
if [[ -f "${FILE}" ]]; then
|
#if [[ -f "${FILE}" ]]; then
|
||||||
if [[ ! -z "$(cat $FILE | grep github)" ]]; then
|
# if [[ ! -z "$(cat $FILE | grep github)" ]]; then
|
||||||
exit 0
|
# exit 0
|
||||||
fi
|
# fi
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
echo "Get token: https://github.com/settings/tokens/new?scopes=repo&description=Composer"
|
echo "Get token: https://github.com/settings/tokens/new?scopes=repo&description=Composer"
|
||||||
|
|
||||||
|
22
src/.env
22
src/.env
@ -4,20 +4,17 @@ WORKSPACE_PGID=1000
|
|||||||
WORKSPACE_TIMEZONE=Europe/Moscow
|
WORKSPACE_TIMEZONE=Europe/Moscow
|
||||||
WORKSPACE_INSTALL_SSH=true
|
WORKSPACE_INSTALL_SSH=true
|
||||||
WORKSPACE_INSTALL_MYSQL_CLIENT=true
|
WORKSPACE_INSTALL_MYSQL_CLIENT=true
|
||||||
WORKSPACE_INSTALL_PYTHON=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_COMPOSER_VERSION=1
|
WORKSPACE_INSTALL_BZ2=true
|
||||||
WORKSPACE_COMPOSER_GLOBAL_INSTALL=true
|
# PHP-extensions already installed: INTL, PGSQL, BCMATH
|
||||||
WORKSPACE_COMPOSER_REPO_PACKAGIST=
|
|
||||||
WORKSPACE_INSTALL_XDEBUG=false
|
|
||||||
WORKSPACE_INSTALL_WP_CLI=true
|
WORKSPACE_INSTALL_WP_CLI=true
|
||||||
WORKSPACE_INSTALL_NODE=true
|
WORKSPACE_INSTALL_NODE=true
|
||||||
WORKSPACE_NODE_VERSION=lts/dubnium
|
WORKSPACE_INSTALL_GULP=false
|
||||||
WORKSPACE_NPM_REGISTRY=
|
|
||||||
WORKSPACE_INSTALL_GULP=true
|
|
||||||
WORKSPACE_INSTALL_YARN=true
|
WORKSPACE_INSTALL_YARN=true
|
||||||
|
WORKSPACE_NODE_VERSION=lts/hydrogen
|
||||||
|
WORKSPACE_NPM_REGISTRY=
|
||||||
WORKSPACE_YARN_VERSION=latest
|
WORKSPACE_YARN_VERSION=latest
|
||||||
|
|
||||||
### PHP-FPM #############################################
|
### PHP-FPM #############################################
|
||||||
@ -25,11 +22,12 @@ INSTALL_XDEBUG=true
|
|||||||
INSTALL_REDIS=true
|
INSTALL_REDIS=true
|
||||||
INSTALL_ZIP=true
|
INSTALL_ZIP=true
|
||||||
INSTALL_BZ2=true
|
INSTALL_BZ2=true
|
||||||
|
INSTALL_OPCACHE=true
|
||||||
INSTALL_INTL=true
|
INSTALL_INTL=true
|
||||||
INSTALL_PGSQL=true
|
INSTALL_PGSQL=true
|
||||||
INSTALL_BCMATH=true
|
INSTALL_BCMATH=true
|
||||||
PHP_OPT_SHORT_OPEN_TAG=On
|
|
||||||
PHP_OPT_MAX_EXECUTION_TIME=600
|
PHP_OPT_MAX_EXECUTION_TIME=600
|
||||||
PHP_OPT_MEMORY_LIMIT=500M
|
PHP_OPT_MEMORY_LIMIT=256M
|
||||||
PHP_OPT_UPLOAD_MAX_FILESIZE=20M
|
PHP_OPT_POST_MAX_SIZE=48M
|
||||||
|
PHP_OPT_UPLOAD_MAX_FILESIZE=16M
|
||||||
|
|
||||||
|
43
src/README.md
Normal file
43
src/README.md
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
## For use DOCKER_BUILD_KIT
|
||||||
|
|
||||||
|
Set bash env vars:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export DOCKER_BUILDKIT=1
|
||||||
|
export COMPOSE_DOCKER_CLI_BUILD=1
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Recommended aliases
|
||||||
|
|
||||||
|
```bash
|
||||||
|
alias dc='docker-compose'
|
||||||
|
alias dils='docker image ls | grep'
|
||||||
|
alias dirm='docker image rm'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Visualize docker images tree
|
||||||
|
|
||||||
|
https://github.com/justone/dockviz
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
|
||||||
|
Add into your `~/.bash_aliases`:
|
||||||
|
|
||||||
|
`alias dockviz="docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock nate/dockviz"`
|
||||||
|
|
||||||
|
For use visualization with `/usr/bin/dot`
|
||||||
|
|
||||||
|
`apt install graphviz`
|
||||||
|
|
||||||
|
### Containers
|
||||||
|
|
||||||
|
This is not usefully, but if your externally needs...
|
||||||
|
|
||||||
|
`dockviz containers -d | dot -Tpng -o ~/containers.png`
|
||||||
|
|
||||||
|
### Images
|
||||||
|
|
||||||
|
Proof technology
|
||||||
|
|
||||||
|
`dockviz images -d | dot -Tpng -o ~/images.png`
|
@ -8,12 +8,13 @@ services:
|
|||||||
- INSTALL_XDEBUG=${INSTALL_XDEBUG}
|
- INSTALL_XDEBUG=${INSTALL_XDEBUG}
|
||||||
- INSTALL_ZIP=${INSTALL_ZIP}
|
- INSTALL_ZIP=${INSTALL_ZIP}
|
||||||
- INSTALL_BZ2=${INSTALL_BZ2}
|
- INSTALL_BZ2=${INSTALL_BZ2}
|
||||||
|
- INSTALL_OPCACHE=${INSTALL_OPCACHE}
|
||||||
- INSTALL_INTL=${INSTALL_INTL}
|
- INSTALL_INTL=${INSTALL_INTL}
|
||||||
- INSTALL_PGSQL=${INSTALL_PGSQL}
|
- INSTALL_PGSQL=${INSTALL_PGSQL}
|
||||||
- INSTALL_BCMATH=${INSTALL_BCMATH}
|
- INSTALL_BCMATH=${INSTALL_BCMATH}
|
||||||
- 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}
|
||||||
|
- PHP_OPT_POST_MAX_SIZE=${PHP_OPT_POST_MAX_SIZE}
|
||||||
- PHP_OPT_UPLOAD_MAX_FILESIZE=${PHP_OPT_UPLOAD_MAX_FILESIZE}
|
- PHP_OPT_UPLOAD_MAX_FILESIZE=${PHP_OPT_UPLOAD_MAX_FILESIZE}
|
||||||
workspace:
|
workspace:
|
||||||
build:
|
build:
|
||||||
@ -24,18 +25,12 @@ services:
|
|||||||
- TZ=${WORKSPACE_TIMEZONE}
|
- TZ=${WORKSPACE_TIMEZONE}
|
||||||
- INSTALL_SSH=${WORKSPACE_INSTALL_SSH}
|
- INSTALL_SSH=${WORKSPACE_INSTALL_SSH}
|
||||||
- INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT}
|
- INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT}
|
||||||
- INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON}
|
|
||||||
- INSTALL_FSWATCH=${WORKSPACE_INSTALL_FSWATCH}
|
- INSTALL_FSWATCH=${WORKSPACE_INSTALL_FSWATCH}
|
||||||
- INSTALL_PING=${WORKSPACE_INSTALL_PING}
|
- INSTALL_PING=${WORKSPACE_INSTALL_PING}
|
||||||
- INSTALL_S3_MINIO_CLIENT=${WORKSPACE_INSTALL_S3_MINIO_CLIENT}
|
- INSTALL_S3_MINIO_CLIENT=${WORKSPACE_INSTALL_S3_MINIO_CLIENT}
|
||||||
- COMPOSER_VERSION=${WORKSPACE_COMPOSER_VERSION}
|
- INSTALL_BZ2=${WORKSPACE_INSTALL_BZ2}
|
||||||
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
|
|
||||||
- COMPOSER_REPO_PACKAGIST=${WORKSPACE_COMPOSER_REPO_PACKAGIST}
|
|
||||||
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
|
|
||||||
- INSTALL_WP_CLI=${WORKSPACE_INSTALL_WP_CLI}
|
- INSTALL_WP_CLI=${WORKSPACE_INSTALL_WP_CLI}
|
||||||
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
|
- PHP_OPT_MAX_EXECUTION_TIME=${PHP_OPT_MAX_EXECUTION_TIME}
|
||||||
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
|
- PHP_OPT_MEMORY_LIMIT=${PHP_OPT_MEMORY_LIMIT}
|
||||||
- NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY}
|
- PHP_OPT_POST_MAX_SIZE=${PHP_OPT_POST_MAX_SIZE}
|
||||||
- INSTALL_GULP=${WORKSPACE_INSTALL_GULP}
|
- PHP_OPT_UPLOAD_MAX_FILESIZE=${PHP_OPT_UPLOAD_MAX_FILESIZE}
|
||||||
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
|
|
||||||
- YARN_VERSION=${WORKSPACE_YARN_VERSION}
|
|
||||||
|
@ -1,35 +1,45 @@
|
|||||||
version: '3.6'
|
version: '3.6'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
php73:
|
php56:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
service: php-fpm
|
service: php-fpm
|
||||||
build:
|
build:
|
||||||
dockerfile: php73.Dockerfile
|
dockerfile: php56.Dockerfile
|
||||||
php74:
|
php74:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
service: php-fpm
|
service: php-fpm
|
||||||
build:
|
build:
|
||||||
dockerfile: php74.Dockerfile
|
dockerfile: php74.Dockerfile
|
||||||
workspace73:
|
php81:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
service: workspace
|
service: php-fpm
|
||||||
build:
|
build:
|
||||||
dockerfile: workspace73.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
|
||||||
service: workspace
|
service: workspace
|
||||||
build:
|
build:
|
||||||
dockerfile: workspace74.Dockerfile
|
dockerfile: workspace74.Dockerfile
|
||||||
|
workspace81:
|
||||||
secrets:
|
extends:
|
||||||
user_ssh_key:
|
file: docker-compose.base.yml
|
||||||
file: ~/.ssh/id_rsa
|
service: workspace
|
||||||
user_known_hosts:
|
build:
|
||||||
file: ~/.ssh/known_hosts
|
dockerfile: workspace81.Dockerfile
|
||||||
composer_auth:
|
workspace82:
|
||||||
file: ~/.composer/auth.json
|
extends:
|
||||||
|
file: docker-compose.base.yml
|
||||||
|
service: workspace
|
||||||
|
build:
|
||||||
|
dockerfile: workspace82.Dockerfile
|
||||||
|
@ -14,15 +14,20 @@ RUN apt-get update && docker-php-ext-install pdo pdo_mysql \
|
|||||||
# xDebug:
|
# xDebug:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
# Copy xdebug configuration for remote debugging
|
|
||||||
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
|
||||||
|
|
||||||
ARG INSTALL_XDEBUG=false
|
ARG INSTALL_XDEBUG=false
|
||||||
|
|
||||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||||
# Install the xdebug extension
|
# Install the xdebug extension
|
||||||
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 \
|
||||||
|
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 && \
|
||||||
@ -55,6 +60,17 @@ RUN if [ ${INSTALL_BZ2} = true ]; then \
|
|||||||
;fi
|
;fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
# OPCACHE:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_OPCACHE=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
|
||||||
|
docker-php-ext-install opcache \
|
||||||
|
&& docker-php-ext-enable opcache \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
# INTL:
|
# INTL:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
@ -89,6 +105,16 @@ RUN if [ ${INSTALL_BCMATH} = true ]; then \
|
|||||||
;fi
|
;fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
# Locales:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
RUN apt --allow-releaseinfo-change update && \
|
||||||
|
apt install -y locales && \
|
||||||
|
sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||||
|
sed -i 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||||
|
locale-gen
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
# Prepend nginx 502 on showing errors:
|
# Prepend nginx 502 on showing errors:
|
||||||
# @see https://stackoverflow.com/questions/55260221/laravel-php-7-3-nginx-502-upstream-prematurely-closed-fastcgi-stdout
|
# @see https://stackoverflow.com/questions/55260221/laravel-php-7-3-nginx-502-upstream-prematurely-closed-fastcgi-stdout
|
||||||
###########################################################################
|
###########################################################################
|
||||||
@ -106,25 +132,14 @@ RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
|
|||||||
# Tune opts:
|
# Tune opts:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
ARG PHP_OPT_SHORT_OPEN_TAG=Off
|
ARG PHP_OPT_MAX_EXECUTION_TIME=600
|
||||||
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=30
|
|
||||||
RUN sed -i "s/^max_execution_time = .*/max_execution_time = $PHP_OPT_MAX_EXECUTION_TIME/g" "$PHP_INI_DIR/php.ini"
|
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=128M
|
ARG PHP_OPT_MEMORY_LIMIT=256M
|
||||||
RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" "$PHP_INI_DIR/php.ini"
|
RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
ARG PHP_OPT_UPLOAD_MAX_FILESIZE=2M
|
ARG PHP_OPT_POST_MAX_SIZE=48M
|
||||||
|
RUN sed -i "s/^post_max_size = .*/post_max_size = $PHP_OPT_UPLOAD_MAX_FILESIZE/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"
|
RUN sed -i "s/^upload_max_filesize = .*/upload_max_filesize = $PHP_OPT_UPLOAD_MAX_FILESIZE/g" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
|
||||||
###########################################################################
|
|
||||||
# Locales:
|
|
||||||
###########################################################################
|
|
||||||
|
|
||||||
RUN apt update && \
|
|
||||||
apt install -y locales && \
|
|
||||||
sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
|
||||||
sed -i 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && \
|
|
||||||
locale-gen
|
|
||||||
|
136
src/dockerfiles/php-fpm/php.base56.Dockerfile
Normal file
136
src/dockerfiles/php-fpm/php.base56.Dockerfile
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libjpeg62-turbo-dev \
|
||||||
|
libpng-dev \
|
||||||
|
libwebp-dev \
|
||||||
|
&& docker-php-ext-install -j$(nproc) iconv \
|
||||||
|
&& docker-php-ext-install mysqli \
|
||||||
|
&& docker-php-ext-enable mysqli
|
||||||
|
|
||||||
|
RUN apt-get update && docker-php-ext-install pdo pdo_mysql \
|
||||||
|
&& docker-php-ext-enable pdo pdo_mysql
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# xDebug:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_XDEBUG=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||||
|
# Install the xdebug extension
|
||||||
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||||
|
pecl install xdebug-2.5.5; \
|
||||||
|
else \
|
||||||
|
pecl install xdebug-2.9.8; \
|
||||||
|
fi && \
|
||||||
|
docker-php-ext-enable xdebug && \
|
||||||
|
sed -i 's/^zend_extension=/;zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Zip:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_ZIP=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_ZIP} = true ]; then \
|
||||||
|
apt update && apt install -y libzip-dev \
|
||||||
|
&& docker-php-ext-install zip \
|
||||||
|
&& docker-php-ext-enable zip \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# BZ2:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_BZ2=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_BZ2} = true ]; then \
|
||||||
|
apt update && apt install -y libbz2-ocaml-dev \
|
||||||
|
&& docker-php-ext-install bz2 \
|
||||||
|
&& docker-php-ext-enable bz2 \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# OPCACHE:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_OPCACHE=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
|
||||||
|
docker-php-ext-install opcache \
|
||||||
|
&& docker-php-ext-enable opcache \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# INTL:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_INTL=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_INTL} = true ]; then \
|
||||||
|
apt update && apt install -y libicu-dev \
|
||||||
|
&& docker-php-ext-install intl \
|
||||||
|
&& docker-php-ext-enable intl \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# PGSQL:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_PGSQL=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||||
|
apt update && apt install -y libpq-dev \
|
||||||
|
&& docker-php-ext-install pgsql \
|
||||||
|
&& docker-php-ext-install pdo_pgsql \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# BCMATH:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_BCMATH=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_BCMATH} = true ]; then \
|
||||||
|
docker-php-ext-install bcmath \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Locales:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
RUN apt install -y locales && \
|
||||||
|
sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||||
|
sed -i 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||||
|
locale-gen
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Prepend nginx 502 on showing errors:
|
||||||
|
# @see https://stackoverflow.com/questions/55260221/laravel-php-7-3-nginx-502-upstream-prematurely-closed-fastcgi-stdout
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
RUN sed -i "s/^log_limit = .*/log_limit = 1024/g" "$PHP_INI_DIR/../php-fpm.d/docker.conf"
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# php.ini opts:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
# https://github.com/php/php-src/blob/master/php.ini-development
|
||||||
|
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Tune opts:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
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_UPLOAD_MAX_FILESIZE/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"
|
@ -1,7 +1,7 @@
|
|||||||
# syntax = edrevo/dockerfile-plus
|
# syntax = edrevo/dockerfile-plus
|
||||||
FROM php:7.3-fpm
|
FROM php:5.6-fpm
|
||||||
|
|
||||||
INCLUDE+ ./php.base.Dockerfile
|
INCLUDE+ ./php.base56.Dockerfile
|
||||||
|
|
||||||
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ \
|
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ \
|
||||||
&& docker-php-ext-install -j$(nproc) gd
|
&& docker-php-ext-install -j$(nproc) gd
|
8
src/dockerfiles/php-fpm/php81.Dockerfile
Normal file
8
src/dockerfiles/php-fpm/php81.Dockerfile
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# syntax = edrevo/dockerfile-plus
|
||||||
|
# https://github.com/docker-library/php/blob/52062af5056d0cd91fa5ded64fad8f9c82847b49/8.1/bookworm/fpm/Dockerfile
|
||||||
|
FROM php:8.1-fpm
|
||||||
|
|
||||||
|
INCLUDE+ ./php.base.Dockerfile
|
||||||
|
|
||||||
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
|
||||||
|
&& docker-php-ext-install -j$(nproc) gd
|
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
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user