Merge branch 'master' into develop

This commit is contained in:
Miguel Ortiz 2019-12-26 11:55:09 -05:00 committed by GitHub
commit aec544961c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 2502 additions and 81 deletions

View File

@ -1,7 +1,12 @@
{
"name": "Laradock",
"dockerComposeFile": ["../docker-compose.yml"],
"runServices": ["nginx", "postgres", "pgadmin"],
"dockerComposeFile": "../docker-compose.yml",
"remoteUser": "laradock",
"runServices": [
"nginx",
"postgres",
"pgadmin"
],
"service": "workspace",
"workspaceFolder": "/var/www",
"shutdownAction": "stopCompose",

1
.gitignore vendored
View File

@ -20,5 +20,6 @@
/.devcontainer/*
!/.devcontainer/devcontainer.example.json
!/.devcontainer/docker-compose.extend-example.yml
.DS_Store

View File

@ -12,12 +12,14 @@ env:
- PHP_VERSION=7.1 BUILD_SERVICE=workspace
- PHP_VERSION=7.2 BUILD_SERVICE=workspace
- PHP_VERSION=7.3 BUILD_SERVICE=workspace
- PHP_VERSION=7.4 BUILD_SERVICE=workspace
- PHP_VERSION=5.6 BUILD_SERVICE=php-fpm
- PHP_VERSION=7.0 BUILD_SERVICE=php-fpm
- PHP_VERSION=7.1 BUILD_SERVICE=php-fpm
- PHP_VERSION=7.2 BUILD_SERVICE=php-fpm
- PHP_VERSION=7.3 BUILD_SERVICE=php-fpm
- PHP_VERSION=7.4 BUILD_SERVICE=php-fpm
- PHP_VERSION=hhvm BUILD_SERVICE=hhvm
@ -26,6 +28,13 @@ env:
- PHP_VERSION=7.1 BUILD_SERVICE=php-worker
- PHP_VERSION=7.2 BUILD_SERVICE=php-worker
- PHP_VERSION=7.3 BUILD_SERVICE=php-worker
- PHP_VERSION=7.4 BUILD_SERVICE=php-worker
- PHP_VERSION=7.0 BUILD_SERVICE=laravel-horizon
- PHP_VERSION=7.1 BUILD_SERVICE=laravel-horizon
- PHP_VERSION=7.2 BUILD_SERVICE=laravel-horizon
- PHP_VERSION=7.3 BUILD_SERVICE=laravel-horizon
- PHP_VERSION=7.4 BUILD_SERVICE=laravel-horizon
- PHP_VERSION=NA BUILD_SERVICE=solr
- PHP_VERSION=NA BUILD_SERVICE="mssql rethinkdb aerospike"

5
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"files.associations": {
"Dockerfile-*": "dockerfile"
},
}

View File

@ -76,7 +76,7 @@ docker-compose exec mysql bash
*Example: enter to MySQL prompt within MySQL container*
```bash
docker-compose exec mysql mysql -u homestead -psecret
docker-compose exec mysql mysql -udefault -psecret
```
3 - To exit a container, type `exit`.
@ -314,6 +314,29 @@ Note: If `.php-fpm/xdebug` doesn't execute and gives `Permission Denied` error t
<br>
<a name="Install-pcov"></a>
## Install pcov
1 - First install `pcov` in the Workspace and the PHP-FPM Containers:
<br>
a) open the `.env` file
<br>
b) search for the `WORKSPACE_INSTALL_PCOV` argument under the Workspace Container
<br>
c) set it to `true`
<br>
d) search for the `PHP_FPM_INSTALL_PCOV` argument under the PHP-FPM Container
<br>
e) set it to `true`
2 - Re-build the containers `docker-compose build workspace php-fpm`
Note that pcov is only supported on PHP 7.1 or newer. For more information on setting up pcov optimally, check the recommended section
of the [README](https://github.com/krakjoe/pcov)
<br>
<a name="Install-phpdbg"></a>
## Install phpdbg
@ -536,7 +559,7 @@ Note: Should add `--user=laradock` (example `docker-compose exec --user=laradock
php artisan
```
```bash
Composer update
composer update
```
```bash
phpunit
@ -1044,6 +1067,7 @@ _Note: You can customize the port on which beanstalkd console is listening by ch
<br>
<a name="Use-Confluence"></a>
## Use Confluence
1 - Run the Confluence Container (`confluence`) with the `docker-compose up` command. Example:
@ -1058,6 +1082,15 @@ docker-compose up -d confluence
You can set custom confluence version in `CONFLUENCE_VERSION`. [Find more info in section 'Versioning'](https://hub.docker.com/r/atlassian/confluence-server/)
##### Confluence usage with Nginx and SSL.
1. Find an instance configuration file in `nginx/sites/confluence.conf.example` and replace sample domain with yours.
2. Configure ssl keys to your domain.
Keep in mind that Confluence is still accessible on 8090 anyway.
<br>
<a name="Use-ElasticSearch"></a>
## Use ElasticSearch
@ -1490,6 +1523,13 @@ To add locales to the container:
4 - Check enabled locales with `docker-compose exec php-fpm locale -a`
Update the locale setting, default is `POSIX`
1 - Open the `.env` file and set `PHP_FPM_DEFAULT_LOCALE` to `en_US.UTF8` or other locale you want.
2 - Re-build your PHP-FPM Container `docker-compose build php-fpm`.
3 - Check the default locale with `docker-compose exec php-fpm locale`
<br>
@ -1575,7 +1615,7 @@ The default username and password for the root MySQL user are `root` and `root `
1 - Enter the MySQL container: `docker-compose exec mysql bash`.
2 - Enter mysql: `mysql -uroot -proot` for non root access use `mysql -uhomestead -psecret`.
2 - Enter mysql: `mysql -uroot -proot` for non root access use `mysql -udefault -psecret`.
3 - See all users: `SELECT User FROM mysql.user;`
@ -1879,7 +1919,9 @@ To install Supervisor in the Workspace container
2 - Set `WORKSPACE_INSTALL_SUPERVISOR` and `WORKSPACE_INSTALL_PYTHON` to `true`.
3 - Re-build the container `docker-compose build workspace` Or `docker-composer up --build -d workspace`
3 - Create supervisor configuration file (for ex., named `laravel-worker.conf`) for Laravel Queue Worker in `php-worker/supervisord.d/` by simply copy from `laravel-worker.conf.example`
4 - Re-build the container `docker-compose build workspace` Or `docker-composer up --build -d workspace`
@ -1994,6 +2036,26 @@ YAML PHP extension allows you to easily parse and create YAML structured data. I
4 - Re-build the container `docker-compose build php-fpm`<br>
<br>
<a name="Install-AST"></a>
## Install AST PHP extension
AST exposes the abstract syntax tree generated by PHP 7+. This extension is required by tools such as `Phan`, a static analyzer for PHP.
1 - Open the `.env` file
2 - Search for the `WORKSPACE_INSTALL_AST` argument under the Workspace Container
3 - Set it to `true`
4 - Re-build the container `docker-compose build workspace`
**Note** If you need a specific version of AST then search for the `WORKSPACE_AST_VERSION` argument under the Workspace Container and set it to the desired version and continue step 4.
<br>
<a name="phpstorm-debugging"></a>
## PHPStorm Debugging Guide

View File

@ -8,6 +8,7 @@ weight: 2
- [Git](https://git-scm.com/downloads)
- [Docker](https://www.docker.com/products/docker/) `>= 17.12`
- [gcloud](https://cloud.google.com/sdk/install)
@ -21,6 +22,17 @@ Choose the setup the best suits your needs.
- [A.2) Don't have a PHP project yet](#A2)
- [B) Setup for Multiple Projects](#B)
### Setup gcloud for docker registry
```
gcloud auth configure-docker
```
and login to gcloud for use the registry and auth the permission.
```
gcloud auth login
```
<a name="A"></a>
### A) Setup for Single Project

View File

@ -12,7 +12,7 @@ Supporting a variety of common services, all pre-configured to provide a full PH
<a name="features"></a>
## Features
- Easy switch between PHP versions: 7.3, 7.2, 7.1, 5.6...
- Easy switch between PHP versions: 7.4, 7.3, 7.2, 7.1, 5.6...
- Choose your favorite database engine: MySQL, Postgres, MariaDB...
- Run your own stack: Memcached, HHVM, RabbitMQ...
- Each software runs on its own container: PHP-FPM, NGINX, PHP-CLI...
@ -36,7 +36,6 @@ Supporting a variety of common services, all pre-configured to provide a full PH
<a name="sponsors"></a>
## Sponsors
<a href="https://opencollective.com/socketio/sponsor/23/website" target="_blank"><img src="https://opencollective.com/socketio/sponsor/23/avatar.svg"></a>
<a href="https://opencollective.com/laradock/sponsor/0/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/0/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/1/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/1/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/2/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/2/avatar.svg?requireActive=false"></a>

View File

@ -156,7 +156,7 @@ Laradock exists thanks to all the people who contribute.
### Code Contributors
<a href="https://github.com/undefined/undefined/graphs/contributors"><img src="https://opencollective.com/laradock/contributors.svg?width=890&button=false" /></a>
<a href="https://github.com/laradock/laradock/graphs/contributors"><img src="https://opencollective.com/laradock/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
@ -176,7 +176,6 @@ Contribute and help us sustain the project.
## Sponsors
<a href="https://opencollective.com/socketio/sponsor/23/website" target="_blank"><img src="https://opencollective.com/socketio/sponsor/23/avatar.svg"></a>
<a href="https://opencollective.com/laradock/sponsor/0/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/0/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/1/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/1/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/2/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/2/avatar.svg?requireActive=false"></a>

View File

@ -47,6 +47,10 @@ volumes:
driver: ${VOLUMES_DRIVER}
cassandra:
driver: ${VOLUMES_DRIVER}
graylog:
driver: ${VOLUMES_DRIVER}
dind:
driver: ${VOLUMES_DRIVER}
services:
@ -55,10 +59,13 @@ services:
build:
context: ./workspace
args:
- CHANGE_SOURCE=${CHANGE_SOURCE}
- UBUNTU_SOURCE=${UBUNTU_SOURCE}
- LARADOCK_PHP_VERSION=${PHP_VERSION}
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
- INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION}
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
- INSTALL_PCOV=${WORKSPACE_INSTALL_PCOV}
- INSTALL_PHPDBG=${WORKSPACE_INSTALL_PHPDBG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SSH2=${WORKSPACE_INSTALL_SSH2}
@ -73,6 +80,7 @@ services:
- INSTALL_GEARMAN=${WORKSPACE_INSTALL_GEARMAN}
- INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS}
- INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL}
- NVM_NODEJS_ORG_MIRROR=${WORKSPACE_NVM_NODEJS_ORG_MIRROR}
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
- NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY}
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
@ -84,6 +92,7 @@ services:
- INSTALL_WP_CLI=${WORKSPACE_INSTALL_WP_CLI}
- INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE}
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
- INSTALL_OCI8=${WORKSPACE_INSTALL_OCI8}
- INSTALL_V8JS=${WORKSPACE_INSTALL_V8JS}
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
- COMPOSER_AUTH=${WORKSPACE_COMPOSER_AUTH}
@ -110,6 +119,10 @@ services:
- INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT}
- INSTALL_PING=${WORKSPACE_INSTALL_PING}
- INSTALL_SSHPASS=${WORKSPACE_INSTALL_SSHPASS}
- INSTALL_INOTIFY=${WORKSPACE_INSTALL_INOTIFY}
- INSTALL_FSWATCH=${WORKSPACE_INSTALL_FSWATCH}
- INSTALL_AST=${WORKSPACE_INSTALL_AST}
- INSTALL_YAML=${WORKSPACE_INSTALL_YAML}
- INSTALL_MAILPARSE=${WORKSPACE_INSTALL_MAILPARSE}
- PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID}
@ -117,6 +130,7 @@ services:
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
- YARN_VERSION=${WORKSPACE_YARN_VERSION}
- DRUSH_VERSION=${WORKSPACE_DRUSH_VERSION}
- AST_VERSION=${WORKSPACE_AST_VERSION}
- TZ=${WORKSPACE_TIMEZONE}
- BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
@ -153,6 +167,7 @@ services:
- LARADOCK_PHP_VERSION=${PHP_VERSION}
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
- INSTALL_PCOV=${PHP_FPM_INSTALL_PCOV}
- INSTALL_PHPDBG=${PHP_FPM_INSTALL_PHPDBG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SSH2=${PHP_FPM_INSTALL_SSH2}
@ -171,6 +186,7 @@ services:
- INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE}
- INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF}
- INSTALL_AEROSPIKE=${PHP_FPM_INSTALL_AEROSPIKE}
- INSTALL_OCI8=${PHP_FPM_INSTALL_OCI8}
- INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
- INSTALL_PG_CLIENT=${PHP_FPM_INSTALL_PG_CLIENT}
@ -187,8 +203,10 @@ services:
- INSTALL_FAKETIME=${PHP_FPM_INSTALL_FAKETIME}
- INSTALL_IONCUBE=${PHP_FPM_INSTALL_IONCUBE}
- INSTALL_APCU=${PHP_FPM_INSTALL_APCU}
- INSTALL_CACHETOOL=${PHP_FPM_INSTALL_CACHETOOL}
- INSTALL_YAML=${PHP_FPM_INSTALL_YAML}
- INSTALL_RDKAFKA=${PHP_FPM_INSTALL_RDKAFKA}
- INSTALL_GETTEXT=${PHP_FPM_INSTALL_GETTEXT}
- INSTALL_ADDITIONAL_LOCALES=${PHP_FPM_INSTALL_ADDITIONAL_LOCALES}
- INSTALL_MYSQL_CLIENT=${PHP_FPM_INSTALL_MYSQL_CLIENT}
- INSTALL_PING=${PHP_FPM_INSTALL_PING}
@ -198,6 +216,9 @@ services:
- ADDITIONAL_LOCALES=${PHP_FPM_ADDITIONAL_LOCALES}
- INSTALL_FFMPEG=${PHP_FPM_FFMPEG}
- INSTALL_XHPROF=${PHP_FPM_INSTALL_XHPROF}
- PUID=${PHP_FPM_PUID}
- PGID=${PHP_FPM_PGID}
- LOCALE=${PHP_FPM_DEFAULT_LOCALE}
- http_proxy
- https_proxy
- no_proxy
@ -224,6 +245,7 @@ services:
build:
context: ./php-worker
args:
- CHANGE_SOURCE=${CHANGE_SOURCE}
- PHP_VERSION=${PHP_VERSION}
- PHALCON_VERSION=${PHALCON_VERSION}
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
@ -257,6 +279,7 @@ services:
build:
context: ./laravel-horizon
args:
- CHANGE_SOURCE=${CHANGE_SOURCE}
- PHP_VERSION=${PHP_VERSION}
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
@ -264,6 +287,7 @@ services:
- INSTALL_SOCKETS=${LARAVEL_HORIZON_INSTALL_SOCKETS}
- INSTALL_CASSANDRA=${PHP_FPM_INSTALL_CASSANDRA}
- INSTALL_PHPREDIS=${LARAVEL_HORIZON_INSTALL_PHPREDIS}
- INSTALL_MONGO=${LARAVEL_HORIZON_INSTALL_MONGO}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ./laravel-horizon/supervisord.d:/etc/supervisord.d
@ -279,9 +303,9 @@ services:
build:
context: ./nginx
args:
- CHANGE_SOURCE=${CHANGE_SOURCE}
- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
- CHANGE_SOURCE=${CHANGE_SOURCE}
- http_proxy
- https_proxy
- no_proxy
@ -403,6 +427,7 @@ services:
build:
context: ./mssql
environment:
- MSSQL_PID=Express
- MSSQL_DATABASE=${MSSQL_DATABASE}
- SA_PASSWORD=${MSSQL_PASSWORD}
- ACCEPT_EULA=Y
@ -501,6 +526,7 @@ services:
- "${MONGODB_PORT}:27017"
volumes:
- ${DATA_PATH_HOST}/mongo:/data/db
- ${DATA_PATH_HOST}/mongo_config:/data/configdb
networks:
- backend
@ -934,9 +960,9 @@ services:
- ${GRAYLOG_GELF_TCP_PORT}:12201
# GELF UDP
- ${GRAYLOG_GELF_UDP_PORT}:12201/udp
user: root
user: graylog
volumes:
- ./graylog/config:/usr/share/graylog/data/config
- ${DATA_PATH_HOST}/graylog:/usr/share/graylog/data
networks:
- backend
@ -1216,6 +1242,7 @@ services:
privileged: true
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ${DATA_PATH_HOST}/dind:/var/lib/docker
expose:
- 2375
networks:
@ -1576,7 +1603,7 @@ services:
volumes:
- ${MANTICORE_CONFIG_PATH}:/etc/sphinxsearch
- ${DATA_PATH_HOST}/manticore/data:/var/lib/manticore/data
- ${DATA_PATH_HOST}/manticore/log:/var/lib/manticore/log
- ${DATA_PATH_HOST}/manticore/log:/var/log/manticore
ports:
- "${MANTICORE_API_PORT}:9312"
- "${MANTICORE_SPHINXQL_PORT}:9306"
@ -1606,6 +1633,7 @@ services:
networks:
- backend
- frontend
### CONFLUENCE ################################################
confluence:
container_name: Confluence
@ -1637,4 +1665,18 @@ services:
ports:
- ${SWAGGER_UI_PORT}:8080
networks:
- backend
- backend
### tomcat ####################################################
tomcat:
container_name: tomcat
image: tomcat:${TOMCAT_VERSION}
ports:
- "${TOMCAT_HOST_HTTP_PORT}:8080"
networks:
- frontend
- backend
volumes:
- ${DATA_PATH_HOST}/tomcat/webapps:/usr/local/tomcat/webapps
- ${DATA_PATH_HOST}/tomcat/logs:/usr/local/tomcat/logs
# restart: always

View File

@ -37,13 +37,14 @@ COMPOSE_PROJECT_NAME=laradock
### PHP Version ###########################################
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 7.3 - 7.2 - 7.1 - 7.0 - 5.6
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM).
# Accepted values: 7.4 - 7.3 - 7.2 - 7.1 - 7.0 - 5.6
PHP_VERSION=7.3
### Phalcon Version ###########################################
# Select a Phalcon version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 3.4.0+
PHALCON_VERSION=3.4.1
PHALCON_VERSION=3.4.5
### PHP Interpreter #######################################
@ -69,6 +70,8 @@ COMPOSE_CONVERT_WINDOWS_PATHS=1
# If you need to change the sources (i.e. to China), set CHANGE_SOURCE to true
CHANGE_SOURCE=false
# Set CHANGE_SOURCE and UBUNTU_SOURCE option if you want to change the Ubuntu system sources.list file.
UBUNTU_SOURCE=aliyun
### Docker Sync ###########################################
@ -84,6 +87,7 @@ DOCKER_SYNC_STRATEGY=native_osx
WORKSPACE_COMPOSER_GLOBAL_INSTALL=true
WORKSPACE_COMPOSER_AUTH=false
WORKSPACE_COMPOSER_REPO_PACKAGIST=
WORKSPACE_NVM_NODEJS_ORG_MIRROR=
WORKSPACE_INSTALL_NODE=true
WORKSPACE_NODE_VERSION=node
WORKSPACE_NPM_REGISTRY=
@ -97,6 +101,7 @@ WORKSPACE_INSTALL_PHPREDIS=true
WORKSPACE_INSTALL_WORKSPACE_SSH=false
WORKSPACE_INSTALL_SUBVERSION=false
WORKSPACE_INSTALL_XDEBUG=false
WORKSPACE_INSTALL_PCOV=false
WORKSPACE_INSTALL_PHPDBG=false
WORKSPACE_INSTALL_SSH2=false
WORKSPACE_INSTALL_LDAP=false
@ -114,6 +119,7 @@ WORKSPACE_DRUSH_VERSION=8.1.17
WORKSPACE_INSTALL_DRUPAL_CONSOLE=false
WORKSPACE_INSTALL_WP_CLI=false
WORKSPACE_INSTALL_AEROSPIKE=false
WORKSPACE_INSTALL_OCI8=false
WORKSPACE_INSTALL_V8JS=false
WORKSPACE_INSTALL_LARAVEL_ENVOY=false
WORKSPACE_INSTALL_LARAVEL_INSTALLER=false
@ -140,6 +146,7 @@ WORKSPACE_INSTALL_PING=false
WORKSPACE_INSTALL_SSHPASS=false
WORKSPACE_INSTALL_INOTIFY=false
WORKSPACE_INSTALL_FSWATCH=false
WORKSPACE_INSTALL_YAML=false
WORKSPACE_INSTALL_MAILPARSE=false
WORKSPACE_PUID=1000
WORKSPACE_PGID=1000
@ -148,6 +155,8 @@ WORKSPACE_TIMEZONE=UTC
WORKSPACE_SSH_PORT=2222
WORKSPACE_INSTALL_FFMPEG=false
WORKSPACE_INSTALL_GNU_PARALLEL=false
WORKSPACE_INSTALL_AST=true
WORKSPACE_AST_VERSION=1.0.3
### PHP_FPM ###############################################
@ -160,6 +169,7 @@ PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=true
PHP_FPM_INSTALL_PHPREDIS=true
PHP_FPM_INSTALL_MEMCACHED=false
PHP_FPM_INSTALL_XDEBUG=false
PHP_FPM_INSTALL_PCOV=false
PHP_FPM_INSTALL_XHPROF=false
PHP_FPM_INSTALL_PHPDBG=false
PHP_FPM_INSTALL_IMAP=false
@ -174,6 +184,7 @@ PHP_FPM_INSTALL_XSL=false
PHP_FPM_INSTALL_GMP=false
PHP_FPM_INSTALL_EXIF=false
PHP_FPM_INSTALL_AEROSPIKE=false
PHP_FPM_INSTALL_OCI8=false
PHP_FPM_INSTALL_PGSQL=false
PHP_FPM_INSTALL_GHOSTSCRIPT=false
PHP_FPM_INSTALL_LDAP=false
@ -187,8 +198,10 @@ PHP_FPM_INSTALL_CALENDAR=false
PHP_FPM_INSTALL_FAKETIME=false
PHP_FPM_INSTALL_IONCUBE=false
PHP_FPM_INSTALL_RDKAFKA=false
PHP_FPM_INSTALL_GETTEXT=false
PHP_FPM_FAKETIME=-0
PHP_FPM_INSTALL_APCU=false
PHP_FPM_INSTALL_CACHETOOL=false
PHP_FPM_INSTALL_YAML=false
PHP_FPM_INSTALL_ADDITIONAL_LOCALES=false
PHP_FPM_INSTALL_MYSQL_CLIENT=false
@ -197,6 +210,10 @@ PHP_FPM_INSTALL_SSHPASS=false
PHP_FPM_INSTALL_MAILPARSE=false
PHP_FPM_FFMPEG=false
PHP_FPM_ADDITIONAL_LOCALES="es_ES.UTF-8 fr_FR.UTF-8"
PHP_FPM_DEFAULT_LOCALE=POSIX
PHP_FPM_PUID=1000
PHP_FPM_PGID=1000
### PHP_WORKER ############################################
@ -233,6 +250,7 @@ NGINX_SSL_PATH=./nginx/ssl/
LARAVEL_HORIZON_INSTALL_SOCKETS=false
LARAVEL_HORIZON_INSTALL_PHPREDIS=true
LARAVEL_HORIZON_INSTALL_MONGO=false
### APACHE ################################################
@ -279,8 +297,8 @@ PERCONA_ENTRYPOINT_INITDB=./percona/docker-entrypoint-initdb.d
### MSSQL #################################################
MSSQL_DATABASE=homestead
MSSQL_PASSWORD=yourStrong(!)Password
MSSQL_DATABASE=master
MSSQL_PASSWORD="yourStrong(!)Password"
MSSQL_PORT=1433
### MARIADB ###############################################
@ -368,7 +386,7 @@ MAILDEV_SMTP_PORT=25
VARNISH_CONFIG=/etc/varnish/default.vcl
VARNISH_PORT=8080
VARNISH_BACKEND_PORT=8888
VARNISHD_PARAMS=-p default_ttl=3600 -p default_grace=3600
VARNISHD_PARAMS="-p default_ttl=3600 -p default_grace=3600"
### Varnish ###############################################
@ -420,10 +438,10 @@ GRAYLOG_GELF_UDP_PORT=12201
# Create an account on blackfire.io. Don't enable blackfire and xDebug at the same time. # visit https://blackfire.io/docs/24-days/06-installation#install-probe-debian for more info.
INSTALL_BLACKFIRE=false
BLACKFIRE_CLIENT_ID=<client_id>
BLACKFIRE_CLIENT_TOKEN=<client_token>
BLACKFIRE_SERVER_ID=<server_id>
BLACKFIRE_SERVER_TOKEN=<server_token>
BLACKFIRE_CLIENT_ID="<client_id>"
BLACKFIRE_CLIENT_TOKEN="<client_token>"
BLACKFIRE_SERVER_ID="<server_id>"
BLACKFIRE_SERVER_TOKEN="<server_token>"
### AEROSPIKE #############################################
@ -532,7 +550,7 @@ FACE_DETECTOR_CASCADE_FILE=haarcascade_frontalface_alt.xml
OPTIMIZERS=[]
JPEGTRAN_PATH=/usr/bin/jpegtran
PROGRESSIVE_JPEG=True
FILTERS=["thumbor.filters.brightness", "thumbor.filters.contrast", "thumbor.filters.rgb", "thumbor.filters.round_corner", "thumbor.filters.quality", "thumbor.filters.noise", "thumbor.filters.watermark", "thumbor.filters.equalize", "thumbor.filters.fill", "thumbor.filters.sharpen", "thumbor.filters.strip_icc", "thumbor.filters.frame", "thumbor.filters.grayscale", "thumbor.filters.rotate", "thumbor.filters.format", "thumbor.filters.max_bytes", "thumbor.filters.convolution", "thumbor.filters.blur", "thumbor.filters.extract_focal", "thumbor.filters.no_upscale"]
FILTERS="[thumbor.filters.brightness, thumbor.filters.contrast, thumbor.filters.rgb, thumbor.filters.round_corner, thumbor.filters.quality, thumbor.filters.noise, thumbor.filters.watermark, thumbor.filters.equalize, thumbor.filters.fill, thumbor.filters.sharpen, thumbor.filters.strip_icc, thumbor.filters.frame, thumbor.filters.grayscale, thumbor.filters.rotate, thumbor.filters.format, thumbor.filters.max_bytes, thumbor.filters.convolution, thumbor.filters.blur, thumbor.filters.extract_focal, thumbor.filters.no_upscale]"
RESULT_STORAGE_EXPIRATION_SECONDS=0
RESULT_STORAGE_FILE_STORAGE_ROOT_PATH=/data/result_storage
RESULT_STORAGE_STORES_UNSAFE=False
@ -584,7 +602,7 @@ GITLAB_POSTGRES_DB=laradock_gitlab
### GITLAB-RUNNER ###############################################
GITLAB_CI_SERVER_URL=http://localhost:8989
GITLAB_RUNNER_REGISTRATION_TOKEN=<my-registration-token>
GITLAB_RUNNER_REGISTRATION_TOKEN="<my-registration-token>"
GITLAB_REGISTER_NON_INTERACTIVE=true
### JUPYTERHUB ###############################################
@ -645,8 +663,8 @@ DOCKER_WEBUI_PORT=8754
### MAILU ###############################################
MAILU_VERSION=latest
MAILU_RECAPTCHA_PUBLIC_KEY=<YOUR_RECAPTCHA_PUBLIC_KEY>
MAILU_RECAPTCHA_PRIVATE_KEY=<YOUR_RECAPTCHA_PRIVATE_KEY>
MAILU_RECAPTCHA_PUBLIC_KEY="<YOUR_RECAPTCHA_PUBLIC_KEY>"
MAILU_RECAPTCHA_PRIVATE_KEY="<YOUR_RECAPTCHA_PRIVATE_KEY>"
# Main mail domain
MAILU_HTTP_PORT=6080
MAILU_HTTPS_PORT=60443
@ -662,7 +680,7 @@ MAILU_SECRET_KEY=ChangeMeChangeMe
# Choose how secure connections will behave (value: letsencrypt, cert, notls, mail)
MAILU_TLS_FLAVOR=cert
# Authentication rate limit (per source IP address)
MAILU_AUTH_RATELIMIT=10/minute;1000/hour
MAILU_AUTH_RATELIMIT="10/minute;1000/hour"
# Opt-out of statistics, replace with "True" to opt out
MAILU_DISABLE_STATISTICS=False
# Message size limit in bytes
@ -684,14 +702,14 @@ MAILU_DMARC_RUF=admin
# Welcome email, enable and set a topic and body if you wish to send welcome
# emails to all users.
MAILU_WELCOME=True
MAILU_WELCOME_SUBJECT=Welcome to your new email account
MAILU_WELCOME_BODY=Welcome to your new email account, if you can read this, then it is configured properly!
MAILU_WELCOME_SUBJECT="Welcome to your new email account"
MAILU_WELCOME_BODY="Welcome to your new email account, if you can read this, then it is configured properly!"
# Path to the admin interface if enabled
MAILU_WEB_ADMIN=/admin
# Path to the webmail if enabled
MAILU_WEB_WEBMAIL=/webmail
# Website name
MAILU_SITENAME=Example Mail
MAILU_SITENAME="Example Mail"
# Linked Website URL
MAILU_WEBSITE=http://mail.example.com
# Default password scheme used for newly created accounts and changed passwords
@ -757,6 +775,10 @@ SONARQUBE_POSTGRES_DB=sonar
SONARQUBE_POSTGRES_USER=sonar
SONARQUBE_POSTGRES_PASSWORD=sonarPass
### TOMCAT ################################################
TOMCAT_VERSION=8.5.43
TOMCAT_HOST_HTTP_PORT=8080
### CASSANDRA ################################################
# Cassandra Version, supported tags can be found at https://hub.docker.com/r/bitnami/cassandra/
@ -833,4 +855,4 @@ GEARMAN_MYSQL_PASSWORD_FILE=
# Database to use by Gearman (Default: Gearmand)
GEARMAN_MYSQL_DB=Gearmand
# Table to use by Gearman (Default: gearman_queue)
GEARMAN_MYSQL_TABLE=gearman_queue
GEARMAN_MYSQL_TABLE=gearman_queue

View File

@ -1,3 +1,3 @@
FROM docker.elastic.co/kibana/kibana:6.6.0
FROM docker.elastic.co/kibana/kibana:7.1.1
EXPOSE 5601

View File

@ -9,6 +9,14 @@ FROM php:${PHP_VERSION}-alpine
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
ARG CHANGE_SOURCE=false
RUN if [ ${CHANGE_SOURCE} = true ]; then \
# Change application source from dl-cdn.alpinelinux.org to aliyun source
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \
;fi
RUN apk --update add wget \
curl \
git \
@ -21,6 +29,7 @@ RUN apk --update add wget \
cyrus-sasl-dev \
libgsasl-dev \
supervisor \
oniguruma-dev \
procps
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
@ -50,7 +59,7 @@ ARG INSTALL_CASSANDRA=false
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
apk --update add cassandra-cpp-driver \
;fi
# Install PhpRedis package:
ARG INSTALL_PHPREDIS=false
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
@ -74,6 +83,12 @@ RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
&& docker-php-ext-enable cassandra \
;fi
# Install MongoDB drivers:
ARG INSTALL_MONGO=false
RUN if [ ${INSTALL_MONGO} = true ]; then \
pecl install mongodb \
&& docker-php-ext-enable mongodb \
;fi
###########################################################################

View File

@ -11,12 +11,12 @@ searchd {
listen = 9312
listen = 9308:http
listen = 9306:mysql41
log = /var/lib/manticore/log/searchd.log
log = /var/log/manticore/searchd.log
# you can also send query_log to /dev/stdout to be shown in docker logs
query_log = /var/lib/manticore/log/query.log
query_log = /var/log/manticore/query.log
read_timeout = 5
max_children = 30
pid_file = /var/run/searchd.pid
pid_file = /var/run/manticore/searchd.pid
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1

View File

@ -1,17 +1,6 @@
FROM microsoft/mssql-server-linux
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
# Create config directory
# an set it as WORKDIR
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Bundle app source
COPY . /usr/src/app
RUN chmod +x /usr/src/app/create_table.sh
FROM mcr.microsoft.com/mssql/server:2017-latest-ubuntu
ENV MSSQL_PID=Express
ENV MSSQL_DATABASE=$MSSQL_DATABASE
ENV ACCEPT_EULA=Y
ENV SA_PASSWORD=$MSSQL_PASSWORD
@ -19,5 +8,3 @@ ENV SA_PASSWORD=$MSSQL_PASSWORD
VOLUME /var/opt/mssql
EXPOSE 1433
CMD /bin/bash ./entrypoint.sh

View File

@ -1,5 +0,0 @@
#wait for the SQL Server to come up
sleep 45
#run the setup script to create the DB and the schema in the DB
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -d master -i setup.sql

View File

@ -1,2 +0,0 @@
#start SQL Server, start the script to create the DB and import the data, start the app
/opt/mssql/bin/sqlservr & /usr/src/app/create_table.sh & tail -f /dev/null

View File

@ -1,4 +0,0 @@
CREATE DATABASE $(MSSQL_DATABASE);
GO
USE $(MSSQL_DATABASE);
GO

View File

@ -0,0 +1,43 @@
server {
listen 80;
listen [::]:80;
server_name www.confluence-domain.com;
rewrite ^(.*) https://confluence-domain.com$1/ permanent;
}
server {
listen 80;
listen [::]:80;
server_name confluence-domain.com;
rewrite ^(.*) https://confluence-domain.com/ permanent;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/nginx/ssl/confluence-domain.com.crt;
ssl_certificate_key /etc/nginx/ssl/confluence-domain.com.key;
server_name confluence-domain.com;
location / {
client_max_body_size 100m;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://confluence-domain.com:8090/;
}
location /synchrony {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://confluence-domain.com:8090/synchrony-proxy;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
error_log /var/log/nginx/bookchangerru_error.log;
access_log /var/log/nginx/bookchangerru_access.log;
}

View File

@ -14,7 +14,7 @@
ARG LARADOCK_PHP_VERSION
FROM laradock/php-fpm:2.5-${LARADOCK_PHP_VERSION}
FROM laradock/php-fpm:2.6.2-${LARADOCK_PHP_VERSION}
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
@ -23,10 +23,14 @@ ARG LARADOCK_PHP_VERSION
# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
ARG CHANGE_SOURCE=false
RUN if [ ${CHANGE_SOURCE} = true ]; then \
# Change application source from deb.debian.org to aliyun source
sed -i 's/deb.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list \
sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && \
sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && \
sed -i 's/security-cdn.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list \
;fi
# always run apt update when start and after add new source list, then clean up at end.
@ -169,6 +173,24 @@ RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /usr/local/e
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /usr/local/etc/php/conf.d/xdebug.ini
###########################################################################
# pcov:
###########################################################################
USER root
ARG INSTALL_PCOV=false
RUN if [ ${INSTALL_PCOV} = true ]; then \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
if [ $(php -r "echo PHP_MINOR_VERSION;") != "0" ]; then \
pecl install pcov && \
docker-php-ext-enable pcov \
;fi \
;fi \
;fi
###########################################################################
# Phpdbg:
###########################################################################
@ -270,9 +292,9 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
ARG INSTALL_XHPROF=false
RUN if [ ${INSTALL_XHPROF} = true ]; then \
# Install the php xhprof extension
# Install the php xhprof extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = 7 ]; then \
curl -L -o /tmp/xhprof.tar.gz "https://github.com/tideways/php-xhprof-extension/archive/v4.1.7.tar.gz"; \
curl -L -o /tmp/xhprof.tar.gz "https://github.com/tideways/php-xhprof-extension/archive/v5.0.1.tar.gz"; \
else \
curl -L -o /tmp/xhprof.tar.gz "https://codeload.github.com/phacility/xhprof/tar.gz/master"; \
fi \
@ -446,6 +468,51 @@ RUN set -xe; \
&& docker-php-ext-enable aerospike \
;fi
###########################################################################
# PHP OCI8:
###########################################################################
ARG INSTALL_OCI8=false
ENV LD_LIBRARY_PATH="/opt/oracle/instantclient_12_1"
ENV OCI_HOME="/opt/oracle/instantclient_12_1"
ENV OCI_LIB_DIR="/opt/oracle/instantclient_12_1"
ENV OCI_INCLUDE_DIR="/opt/oracle/instantclient_12_1/sdk/include"
ENV OCI_VERSION=12
RUN if [ ${INSTALL_OCI8} = true ]; then \
# Install wget
apt-get update && apt-get install --no-install-recommends -y wget \
# Install Oracle Instantclient
&& mkdir /opt/oracle \
&& cd /opt/oracle \
&& wget https://github.com/diogomascarenha/oracle-instantclient/raw/master/instantclient-basic-linux.x64-12.1.0.2.0.zip \
&& wget https://github.com/diogomascarenha/oracle-instantclient/raw/master/instantclient-sdk-linux.x64-12.1.0.2.0.zip \
&& unzip /opt/oracle/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /opt/oracle \
&& unzip /opt/oracle/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /opt/oracle \
&& ln -s /opt/oracle/instantclient_12_1/libclntsh.so.12.1 /opt/oracle/instantclient_12_1/libclntsh.so \
&& ln -s /opt/oracle/instantclient_12_1/libclntshcore.so.12.1 /opt/oracle/instantclient_12_1/libclntshcore.so \
&& ln -s /opt/oracle/instantclient_12_1/libocci.so.12.1 /opt/oracle/instantclient_12_1/libocci.so \
&& rm -rf /opt/oracle/*.zip \
# Install PHP extensions deps
&& apt-get update \
&& apt-get install --no-install-recommends -y \
libaio-dev \
freetds-dev && \
# Install PHP extensions
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.0.10; \
else \
echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8; \
fi \
&& docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/opt/oracle/instantclient_12_1,12.1 \
&& docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \
&& docker-php-ext-install \
pdo_oci \
&& docker-php-ext-enable \
oci8 \
;fi
###########################################################################
# IonCube Loader:
###########################################################################
@ -682,6 +749,17 @@ RUN if [ ${INSTALL_RDKAFKA} = true ]; then \
docker-php-ext-enable rdkafka \
;fi
###########################################################################
# GETTEXT:
###########################################################################
ARG INSTALL_GETTEXT=false
RUN if [ ${INSTALL_GETTEXT} = true ]; then \
apt-get install -y zlib1g-dev libicu-dev g++ libpq-dev libssl-dev gettext && \
docker-php-ext-install gettext \
;fi
###########################################################################
# Install additional locales:
###########################################################################
@ -767,6 +845,22 @@ RUN if [ ${INSTALL_MAILPARSE} = true ]; then \
&& docker-php-ext-enable mailparse \
;fi
###########################################################################
# CacheTool:
###########################################################################
ARG INSTALL_CACHETOOL=false
RUN if [ ${INSTALL_CACHETOOL} = true ]; then \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") -ge 1 ]; then \
curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar; \
else \
curl http://gordalina.github.io/cachetool/downloads/cachetool-3.2.1.phar -o cachetool.phar; \
fi && \
chmod +x cachetool.phar && \
mv cachetool.phar /usr/local/bin/cachetool \
;fi
###########################################################################
# Check PHP version:
###########################################################################
@ -789,7 +883,14 @@ RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
rm /var/log/lastlog /var/log/faillog
RUN usermod -u 1000 www-data
# Configure non-root user.
ARG PUID=1000
ENV PUID ${PUID}
ARG PGID=1000
ENV PGID ${PGID}
RUN groupmod -o -g ${PGID} www-data && \
usermod -o -u ${PUID} -g www-data www-data
# Adding the faketime library to the preload file needs to be done last
# otherwise it will preload it for all commands that follow in this file
@ -797,6 +898,10 @@ RUN if [ ${INSTALL_FAKETIME} = true ]; then \
echo "/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1" > /etc/ld.so.preload \
;fi
# Configure locale.
ARG LOCALE=POSIX
ENV LC_ALL ${LOCALE}
WORKDIR /var/www
CMD ["php-fpm"]

1918
php-fpm/php7.4.ini Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
[xhprof]
; extension=xhprof.so
extension=tideways.so
extension=tideways_xhprof.so
xhprof.output_dir=/var/www/xhprof
; no need to autoload, control in the program
tideways.auto_prepend_library=0

View File

@ -9,6 +9,14 @@ FROM php:${PHP_VERSION}-alpine
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
ARG CHANGE_SOURCE=false
RUN if [ ${CHANGE_SOURCE} = true ]; then \
# Change application source from dl-cdn.alpinelinux.org to aliyun source
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \
;fi
RUN apk --update add wget \
curl \
git \
@ -93,7 +101,11 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \
ARG INSTALL_GEARMAN=false
RUN if [ ${INSTALL_GEARMAN} = true ]; then \
docker-php-ext-install gearman \
sed -i "\$ahttp://dl-cdn.alpinelinux.org/alpine/edge/main" /etc/apk/repositories && \
sed -i "\$ahttp://dl-cdn.alpinelinux.org/alpine/edge/community" /etc/apk/repositories && \
sed -i "\$ahttp://dl-cdn.alpinelinux.org/alpine/edge/testing" /etc/apk/repositories && \
apk --update add php7-gearman && \
sh -c 'echo "extension=/usr/lib/php7/modules/gearman.so" > /usr/local/etc/php/conf.d/gearman.ini' \
;fi
# Install Cassandra drivers:

View File

@ -5,5 +5,10 @@ LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
# Add volume for sessions to allow session persistence
VOLUME /sessions
RUN echo '' >> /usr/local/etc/php/conf.d/php-phpmyadmin.ini \
&& echo '[PHP]' >> /usr/local/etc/php/conf.d/php-phpmyadmin.ini \
&& echo 'post_max_size = 2G' >> /usr/local/etc/php/conf.d/php-phpmyadmin.ini \
&& echo 'upload_max_filesize = 2G' >> /usr/local/etc/php/conf.d/php-phpmyadmin.ini
# We expose phpMyAdmin on port 80
EXPOSE 80

View File

@ -33,7 +33,7 @@
# EOSQL
#
### default database and user for confluence ##############################################
if [ "$POSTGRES_CONFLUENCE_INIT" == 'true' ]; then
if [ "$CONFLUENCE_POSTGRES_INIT" == 'true' ]; then
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER $POSTGRES_CONFLUENCE_USER WITH PASSWORD '$POSTGRES_CONFLUENCE_PASSWORD';
CREATE DATABASE $POSTGRES_CONFLUENCE_DB;
@ -41,4 +41,4 @@ if [ "$POSTGRES_CONFLUENCE_INIT" == 'true' ]; then
ALTER ROLE $POSTGRES_CONFLUENCE_USER CREATEROLE SUPERUSER;
EOSQL
echo
fi
fi

View File

@ -14,7 +14,7 @@
ARG LARADOCK_PHP_VERSION
FROM laradock/workspace:2.5-${LARADOCK_PHP_VERSION}
FROM laradock/workspace:2.6.1-${LARADOCK_PHP_VERSION}
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
@ -23,6 +23,16 @@ ARG LARADOCK_PHP_VERSION
# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
ARG CHANGE_SOURCE=false
RUN if [ ${CHANGE_SOURCE} = true ]; then \
# Change application source from deb.debian.org to aliyun source
sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && \
sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && \
sed -i 's/security-cdn.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list \
;fi
# Start as root
USER root
@ -36,6 +46,15 @@ ENV PUID ${PUID}
ARG PGID=1000
ENV PGID ${PGID}
ARG CHANGE_SOURCE=false
ARG UBUNTU_SOURCE
COPY ./sources.sh /tmp/sources.sh
RUN if [ ${CHANGE_SOURCE} = true ]; then \
/bin/sh -c /tmp/sources.sh && \
rm -rf /tmp/sources.sh \
;fi
# always run apt update when start and after add new source list, then clean up at end.
RUN set -xe; \
apt-get update -yqq && \
@ -323,6 +342,25 @@ RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /etc/php/${L
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini
###########################################################################
# pcov:
###########################################################################
USER root
ARG INSTALL_PCOV=false
RUN if [ ${INSTALL_PCOV} = true ]; then \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
if [ $(php -r "echo PHP_MINOR_VERSION;") != "0" ]; then \
pecl install pcov && \
echo "extension=pcov.so" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini && \
echo "pcov.enabled" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini \
;fi \
;fi \
;fi
###########################################################################
# Phpdbg:
###########################################################################
@ -520,6 +558,21 @@ RUN if [ ${INSTALL_INOTIFY} = true ]; then \
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/inotify.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-inotify.ini \
;fi
###########################################################################
# AST EXTENSION
###########################################################################
ARG INSTALL_AST=false
ARG AST_VERSION=1.0.3
ENV AST_VERSION ${AST_VERSION}
RUN if [ ${INSTALL_AST} = true ]; then \
# Install AST extension
printf "\n" | pecl -q install ast-${AST_VERSION} && \
echo "extension=ast.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/ast.ini && \
phpenmod -v ${LARADOCK_PHP_VERSION} -s cli ast \
;fi
###########################################################################
# fswatch
###########################################################################
@ -580,6 +633,8 @@ ARG INSTALL_NPM_ANGULAR_CLI=false
ARG NPM_REGISTRY
ENV NPM_REGISTRY ${NPM_REGISTRY}
ENV NVM_DIR /home/laradock/.nvm
ARG NVM_NODEJS_ORG_MIRROR
ENV NVM_NODEJS_ORG_MIRROR ${NVM_NODEJS_ORG_MIRROR}
RUN if [ ${INSTALL_NODE} = true ]; then \
# Install nvm (A Node Version Manager)
@ -720,6 +775,47 @@ RUN set -xe; \
&& echo 'aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua' >> /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/aerospike.ini \
;fi
###########################################################################
# PHP OCI8:
###########################################################################
USER root
ARG INSTALL_OCI8=false
ENV LD_LIBRARY_PATH="/opt/oracle/instantclient_12_1"
ENV OCI_HOME="/opt/oracle/instantclient_12_1"
ENV OCI_LIB_DIR="/opt/oracle/instantclient_12_1"
ENV OCI_INCLUDE_DIR="/opt/oracle/instantclient_12_1/sdk/include"
ENV OCI_VERSION=12
RUN if [ ${INSTALL_OCI8} = true ]; then \
# Install wget
apt-get update && apt-get install --no-install-recommends -y wget \
# Install Oracle Instantclient
&& mkdir /opt/oracle \
&& cd /opt/oracle \
&& wget https://github.com/diogomascarenha/oracle-instantclient/raw/master/instantclient-basic-linux.x64-12.1.0.2.0.zip \
&& wget https://github.com/diogomascarenha/oracle-instantclient/raw/master/instantclient-sdk-linux.x64-12.1.0.2.0.zip \
&& unzip /opt/oracle/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /opt/oracle \
&& unzip /opt/oracle/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /opt/oracle \
&& ln -s /opt/oracle/instantclient_12_1/libclntsh.so.12.1 /opt/oracle/instantclient_12_1/libclntsh.so \
&& ln -s /opt/oracle/instantclient_12_1/libclntshcore.so.12.1 /opt/oracle/instantclient_12_1/libclntshcore.so \
&& ln -s /opt/oracle/instantclient_12_1/libocci.so.12.1 /opt/oracle/instantclient_12_1/libocci.so \
&& rm -rf /opt/oracle/*.zip \
# Install PHP extensions deps
&& apt-get update \
&& apt-get install --no-install-recommends -y \
libaio-dev && \
# Install PHP extensions
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.0.10; \
else \
echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8; \
fi \
&& echo "extension=oci8.so" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini \
&& php -m | grep -q 'oci8' \
;fi
###########################################################################
# PHP V8JS:
###########################################################################
@ -777,13 +873,6 @@ RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
;fi
ARG INSTALL_LARAVEL_INSTALLER=false
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
# Install the Laravel Installer
composer global require "laravel/installer" \
;fi
###########################################################################
# Deployer:
###########################################################################
@ -1101,6 +1190,25 @@ RUN if [ ${INSTALL_SSHPASS} = true ]; then \
apt-get -y install sshpass \
;fi
###########################################################################
# YAML: extension for PHP-CLI
###########################################################################
USER root
ARG INSTALL_YAML=false
RUN if [ ${INSTALL_YAML} = true ]; then \
apt-get install libyaml-dev -y ; \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install -a yaml-1.3.2; \
else \
pecl install yaml; \
fi && \
echo "extension=yaml.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini && \
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/35-yaml.ini \
;fi
###########################################################################
# FFMpeg:
###########################################################################

83
workspace/sources.sh Executable file
View File

@ -0,0 +1,83 @@
#!/bin/bash
set -xe;
if type "tee" 2>/dev/null && [ -n "${UBUNTU_SOURCE}" ]; then
SOURCE_PATH="/etc/apt/sources.list"
cp ${SOURCE_PATH} ${SOURCE_PATH}.bak && rm -rf ${SOURCE_PATH}
case "${UBUNTU_SOURCE}" in
"aliyun")
tee ${SOURCE_PATH} <<-'EOF'
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
EOF
;;
"zju")
tee ${SOURCE_PATH} <<-'EOF'
deb http://mirrors.zju.edu.cn/ubuntu/ bionic main multiverse restricted universe
deb http://mirrors.zju.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe
deb http://mirrors.zju.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe
deb http://mirrors.zju.edu.cn/ubuntu/ bionic-security main multiverse restricted universe
deb http://mirrors.zju.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe
deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic main multiverse restricted universe
deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe
deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe
deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-security main multiverse restricted universe
deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe
EOF
;;
"tsinghua")
tee ${SOURCE_PATH} <<-'EOF'
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
EOF
;;
"163")
tee ${SOURCE_PATH} <<-'EOF'
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
EOF
;;
"ustc")
tee ${SOURCE_PATH} <<-'EOF'
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
EOF
;;
*)
echo "Please check whether there is aliyun|zju|tsinghua|163|ustc in the parameter"
exit 1;;
esac
fi