Compare commits
36 Commits
Author | SHA1 | Date | |
---|---|---|---|
63fc1fde44 | |||
623ff66f40 | |||
5bf8be6303 | |||
c0a36a5a4d | |||
c0b28fc404 | |||
9e537ee16b | |||
fbae49b898 | |||
bc8772441b | |||
dba1594b05 | |||
2dd64aef55 | |||
23193babf4 | |||
fbdfc41927 | |||
7ea44ca25a | |||
76b71d264d | |||
c7289f7db3 | |||
e8d84cf9a3 | |||
4417083a80 | |||
0980523049 | |||
d8b3cb5a52 | |||
d34602ae29 | |||
cbbdb0a86b | |||
f5c80cd251 | |||
5b07fbb9c4 | |||
83a24efa70 | |||
a03c225e27 | |||
95965b12e7 | |||
58d7d4fa0b | |||
1f22e86d92 | |||
c8b526be13 | |||
b1cbd48221 | |||
d1f3bc8e5c | |||
9920397463 | |||
6f4664c579 | |||
254a9ae194 | |||
8ca26e6c06 | |||
6c8adbc195 |
2
.github/README.md
vendored
2
.github/README.md
vendored
@ -16,7 +16,7 @@
|
||||
<h4 align="center" style="color:#7d58c2">Use Docker First And Learn About It Later</h4>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://zalt.me"><img src="http://forthebadge.com/images/badges/built-by-developers.svg" alt="forthebadge" width="240" ></a>
|
||||
<a href="http://zalt.me"><img src="http://forthebadge.com/images/badges/built-by-developers.svg" alt="forthebadge" width="240" ></a>
|
||||
</p>
|
||||
|
||||
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -12,3 +12,5 @@
|
||||
/nginx/ssl/*.crt
|
||||
/nginx/ssl/*.key
|
||||
/nginx/ssl/*.csr
|
||||
|
||||
.DS_Store
|
@ -33,7 +33,7 @@ env:
|
||||
- PHP_VERSION=NA BUILD_SERVICE="adminer phpmyadmin pgadmin"
|
||||
- PHP_VERSION=NA BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 haproxy"
|
||||
- PHP_VERSION=NA BUILD_SERVICE="kibana grafana laravel-echo-server"
|
||||
- PHP_VERSION=NA BUILD_SERVICE="ipython-controller"
|
||||
- PHP_VERSION=NA BUILD_SERVICE="ipython-controller manticore"
|
||||
# - PHP_VERSION=NA BUILD_SERVICE="aws"
|
||||
|
||||
# Installing a newer Docker version
|
||||
|
@ -394,6 +394,37 @@ Always download the latest version of [Loaders for ionCube ](http://www.ioncube.
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Install-SonarQube"></a>
|
||||
|
||||
## Install SonarQube (automatic code review tool)
|
||||
SonarQube® is an automatic code review tool to detect bugs, vulnerabilities and code smells in your code. It can integrate with your existing workflow to enable continuous code inspection across your project branches and pull requests.
|
||||
<br>
|
||||
1 - Open the `.env` file
|
||||
<br>
|
||||
2 - Search for the `SONARQUBE_HOSTNAME=sonar.example.com` argument
|
||||
<br>
|
||||
3 - Set it to your-domain `sonar.example.com`
|
||||
<br>
|
||||
4 - `docker-compose up -d sonarqube`
|
||||
<br>
|
||||
5 - Open your browser: http://localhost:9000/
|
||||
|
||||
Troubleshooting:
|
||||
|
||||
if you encounter a database error:
|
||||
```
|
||||
docker-compose exec --user=root postgres
|
||||
source docker-entrypoint-initdb.d/init_sonarqube_db.sh
|
||||
```
|
||||
|
||||
If you encounter logs error:
|
||||
```
|
||||
docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs
|
||||
```
|
||||
[**SonarQube Documentation Here**](https://docs.sonarqube.org/latest/)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -409,7 +440,9 @@ Always download the latest version of [Loaders for ionCube ](http://www.ioncube.
|
||||
<a name="Laradock-for-Production"></a>
|
||||
## Prepare Laradock for Production
|
||||
|
||||
It's recommended for production to create a custom `docker-compose.yml` file. For that reason, Laradock is shipped with `production-docker-compose.yml` which should contain only the containers you are planning to run on production (usage example: `docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...`).
|
||||
It's recommended for production to create a custom `docker-compose.yml` file, for example `production-docker-compose.yml`
|
||||
|
||||
In your new production `docker-compose.yml` file you should contain only the containers you are planning to run in production (usage example: `docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...`).
|
||||
|
||||
Note: The Database (MySQL/MariaDB/...) ports should not be forwarded on production, because Docker will automatically publish the port on the host, which is quite insecure, unless specifically told not to. So make sure to remove these lines:
|
||||
|
||||
@ -862,6 +895,67 @@ docker-compose up -d gitlab
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-Gitlab-Runner"></a>
|
||||
## Use Gitlab Runner
|
||||
|
||||
1 - Retrieve the registration token in your gitlab project (Settings > CI / CD > Runners > Set up a specific Runner manually)
|
||||
|
||||
2 - Open the `.env` file and set the following changes:
|
||||
```
|
||||
# so that gitlab container will pass the correct domain to gitlab-runner container
|
||||
GITLAB_DOMAIN_NAME=http://gitlab
|
||||
|
||||
GITLAB_RUNNER_REGISTRATION_TOKEN=<value-in-step-1>
|
||||
|
||||
# so that gitlab-runner container will send POST request for registration to correct domain
|
||||
GITLAB_CI_SERVER_URL=http://gitlab
|
||||
```
|
||||
|
||||
3 - Open the `docker-compose.yml` file and add the following changes:
|
||||
```yml
|
||||
gitlab-runner:
|
||||
environment: # these values will be used during `gitlab-runner register`
|
||||
- RUNNER_EXECUTOR=docker # change from shell (default)
|
||||
- DOCKER_IMAGE=alpine
|
||||
- DOCKER_NETWORK_MODE=laradock_backend
|
||||
networks:
|
||||
- backend # connect to network where gitlab service is connected
|
||||
```
|
||||
|
||||
4 - Run the Gitlab-Runner Container (`gitlab-runner`) with the `docker-compose up` command. Example:
|
||||
|
||||
```bash
|
||||
docker-compose up -d gitlab-runner
|
||||
```
|
||||
|
||||
5 - Register the gitlab-runner to the gitlab container
|
||||
|
||||
```bash
|
||||
docker-compose exec gitlab-runner bash
|
||||
gitlab-runner register
|
||||
```
|
||||
|
||||
6 - Create a `.gitlab-ci.yml` file for your pipeline
|
||||
|
||||
```yml
|
||||
before_script:
|
||||
- echo Hello!
|
||||
|
||||
job1:
|
||||
scripts:
|
||||
- echo job1
|
||||
```
|
||||
|
||||
7 - Push changes to gitlab
|
||||
|
||||
8 - Verify that pipeline is run successful
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-Adminer"></a>
|
||||
## Use Adminer
|
||||
@ -1289,6 +1383,21 @@ To install CodeIgniter 3 on Laradock all you have to do is the following simple
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Install-Powerline"></a>
|
||||
## Install Powerline
|
||||
|
||||
1 - Open the `.env` file and set `WORKSPACE_INSTALL_POWERLINE` and `WORKSPACE_INSTALL_PYTHON` to `true`.
|
||||
|
||||
2 - Run `docker-compose build workspace`, after the step above.
|
||||
|
||||
Powerline is required python
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Install-Symfony"></a>
|
||||
## Install Symfony
|
||||
@ -1701,6 +1810,47 @@ Linuxbrew is a package manager for Linux. It is the Linux version of MacOS Homeb
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Install-FFMPEG"></a>
|
||||
## Install FFMPEG
|
||||
|
||||
To install FFMPEG in the Workspace container
|
||||
|
||||
1 - Open the `.env` file
|
||||
|
||||
2 - Search for the `WORKSPACE_INSTALL_FFMPEG` argument under the Workspace Container and set it to `true`
|
||||
|
||||
3 - Re-build the container `docker-compose build workspace`
|
||||
|
||||
4 - If you use the `php-worker` container too, please follow the same steps above especially if you have conversions that have been queued.
|
||||
|
||||
**PS** Don't forget to install the binary in the `php-fpm` container too by applying the same steps above to its container, otherwise the you'll get an error when running the `php-ffmpeg` binary.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Install-GNU-Parallel"></a>
|
||||
## Install GNU Parallel
|
||||
|
||||
GNU Parallel is a command line tool to run multiple processes in parallel.
|
||||
|
||||
(see https://www.gnu.org/software/parallel/parallel_tutorial.html)
|
||||
|
||||
To install GNU Parallel in the Workspace container
|
||||
|
||||
1 - Open the `.env` file
|
||||
|
||||
2 - Search for the `WORKSPACE_INSTALL_GNU_PARALLEL` argument under the Workspace Container and set it to `true`
|
||||
|
||||
3 - Re-build the container `docker-compose build workspace`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Common-Aliases"></a>
|
||||
|
@ -69,6 +69,14 @@ Note that more containers are available, find them in the [docs](http://laradock
|
||||
docker-compose exec workspace bash
|
||||
```
|
||||
|
||||
## Execute commands
|
||||
|
||||
If you want to only execute some command and don't want to enter bash, you can execute `docker-compose run workspace <command>`.
|
||||
|
||||
```
|
||||
docker-compose run workspace php artisan migrate
|
||||
```
|
||||
|
||||
## Install and configure Laravel
|
||||
|
||||
Let's install Laravel's dependencies, add the `.env` file, generate the key and give proper permissions to the cache folder.
|
||||
|
@ -1,7 +1,3 @@
|
||||
FROM aerospike:latest
|
||||
|
||||
LABEL maintainer="Luciano Jr <luciano@lucianojr.com.br>"
|
||||
|
||||
RUN rm /etc/aerospike/aerospike.conf
|
||||
|
||||
COPY aerospike.conf /etc/aerospike/aerospike.conf
|
||||
|
@ -1,77 +0,0 @@
|
||||
# Aerospike database configuration file.
|
||||
|
||||
# This stanza must come first.
|
||||
service {
|
||||
user root
|
||||
group root
|
||||
paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
|
||||
pidfile /var/run/aerospike/asd.pid
|
||||
service-threads 4
|
||||
transaction-queues 4
|
||||
transaction-threads-per-queue 4
|
||||
proto-fd-max 15000
|
||||
}
|
||||
|
||||
logging {
|
||||
|
||||
# Log file must be an absolute path.
|
||||
file /var/log/aerospike/aerospike.log {
|
||||
context any info
|
||||
}
|
||||
|
||||
# Send log messages to stdout
|
||||
console {
|
||||
context any critical
|
||||
}
|
||||
}
|
||||
|
||||
network {
|
||||
service {
|
||||
address any
|
||||
port 3000
|
||||
|
||||
# Uncomment the following to set the `access-address` parameter to the
|
||||
# IP address of the Docker host. This will the allow the server to correctly
|
||||
# publish the address which applications and other nodes in the cluster to
|
||||
# use when addressing this node.
|
||||
# access-address <IPADDR>
|
||||
}
|
||||
|
||||
heartbeat {
|
||||
|
||||
# mesh is used for environments that do not support multicast
|
||||
mode mesh
|
||||
port 3002
|
||||
|
||||
# use asinfo -v 'tip:host=<ADDR>;port=3002' to inform cluster of
|
||||
# other mesh nodes
|
||||
mesh-port 3002
|
||||
|
||||
interval 150
|
||||
timeout 10
|
||||
}
|
||||
|
||||
fabric {
|
||||
port 3001
|
||||
}
|
||||
|
||||
info {
|
||||
port 3003
|
||||
}
|
||||
}
|
||||
|
||||
namespace test {
|
||||
replication-factor 2
|
||||
memory-size 1G
|
||||
default-ttl 5d # 5 days, use 0 to never expire/evict.
|
||||
|
||||
# storage-engine memory
|
||||
|
||||
# To use file storage backing, comment out the line above and use the
|
||||
# following lines instead.
|
||||
storage-engine device {
|
||||
file /opt/aerospike/data/test.dat
|
||||
filesize 4G
|
||||
data-in-memory true # Store data in memory in addition to file.
|
||||
}
|
||||
}
|
@ -1,30 +1,5 @@
|
||||
FROM golang:alpine
|
||||
FROM abiosoft/caddy:no-stats
|
||||
|
||||
LABEL maintainer="Huadong Zuo <admin@zuohuadong.cn>"
|
||||
CMD ["--conf", "/etc/caddy/Caddyfile", "--log", "stdout", "--agree=true"]
|
||||
|
||||
RUN apk add --no-cache \
|
||||
openssh \
|
||||
git \
|
||||
build-base \
|
||||
&& mkdir -p $GOPATH/src/golang.org/x/ \
|
||||
&& cd $GOPATH/src/golang.org/x/ \
|
||||
&& git clone https://github.com/golang/sys.git sys \
|
||||
&& go get github.com/abiosoft/caddyplug/caddyplug \
|
||||
&& caddyplug install-caddy \
|
||||
apk del build-base
|
||||
|
||||
ARG plugins="cors"
|
||||
|
||||
## ARG plugins="cors cgi cloudflare azure linode"
|
||||
|
||||
RUN caddyplug install ${plugins}
|
||||
|
||||
RUN apk add --no-cache inotify-tools \
|
||||
&& echo -e "#!/bin/sh\nwhile inotifywait -e modify /etc/caddy; do\n\tpkill caddy\ndone " >> /start.sh \
|
||||
&& chmod +x /start.sh
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
WORKDIR /var/www/public
|
||||
|
||||
CMD ["sh","-c","/start.sh & /usr/bin/caddy -conf /etc/caddy/Caddyfile -agree"]
|
||||
EXPOSE 80 443 2015
|
||||
|
@ -41,6 +41,8 @@ volumes:
|
||||
driver: ${VOLUMES_DRIVER}
|
||||
mosquitto:
|
||||
driver: ${VOLUMES_DRIVER}
|
||||
sonarqube:
|
||||
driver: ${VOLUMES_DRIVER}
|
||||
|
||||
services:
|
||||
|
||||
@ -96,9 +98,12 @@ services:
|
||||
- INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT}
|
||||
- INSTALL_PHALCON=${WORKSPACE_INSTALL_PHALCON}
|
||||
- INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE}
|
||||
- INSTALL_TAINT=${WORKSPACE_INSTALL_TAINT}
|
||||
- INSTALL_LIBPNG=${WORKSPACE_INSTALL_LIBPNG}
|
||||
- INSTALL_IONCUBE=${WORKSPACE_INSTALL_IONCUBE}
|
||||
- INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT}
|
||||
- INSTALL_PING=${WORKSPACE_INSTALL_PING}
|
||||
- INSTALL_SSHPASS=${WORKSPACE_INSTALL_SSHPASS}
|
||||
- PUID=${WORKSPACE_PUID}
|
||||
- PGID=${WORKSPACE_PGID}
|
||||
- CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION}
|
||||
@ -108,6 +113,12 @@ services:
|
||||
- TZ=${WORKSPACE_TIMEZONE}
|
||||
- BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
|
||||
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
|
||||
- INSTALL_POWERLINE=${WORKSPACE_INSTALL_POWERLINE}
|
||||
- INSTALL_FFMPEG=${WORKSPACE_INSTALL_FFMPEG}
|
||||
- INSTALL_GNU_PARALLEL=${WORKSPACE_INSTALL_GNU_PARALLEL}
|
||||
- http_proxy
|
||||
- https_proxy
|
||||
- no_proxy
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
|
||||
extra_hosts:
|
||||
@ -151,11 +162,13 @@ services:
|
||||
- INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
|
||||
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
|
||||
- INSTALL_PG_CLIENT=${PHP_FPM_INSTALL_PG_CLIENT}
|
||||
- INSTALL_POSTGIS=${PHP_FPM_INSTALL_POSTGIS}
|
||||
- INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
|
||||
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}
|
||||
- INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP}
|
||||
- INSTALL_PHALCON=${PHP_FPM_INSTALL_PHALCON}
|
||||
- INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE}
|
||||
- INSTALL_TAINT=${PHP_FPM_INSTALL_TAINT}
|
||||
- INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS}
|
||||
- INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK}
|
||||
- INSTALL_CALENDAR=${PHP_FPM_INSTALL_CALENDAR}
|
||||
@ -163,9 +176,16 @@ services:
|
||||
- INSTALL_IONCUBE=${PHP_FPM_INSTALL_IONCUBE}
|
||||
- INSTALL_APCU=${PHP_FPM_INSTALL_APCU}
|
||||
- INSTALL_YAML=${PHP_FPM_INSTALL_YAML}
|
||||
- INSTALL_RDKAFKA=${PHP_FPM_INSTALL_RDKAFKA}
|
||||
- INSTALL_ADDITIONAL_LOCALES=${PHP_FPM_INSTALL_ADDITIONAL_LOCALES}
|
||||
- INSTALL_MYSQL_CLIENT=${PHP_FPM_INSTALL_MYSQL_CLIENT}
|
||||
- INSTALL_PING=${PHP_FPM_INSTALL_PING}
|
||||
- INSTALL_SSHPASS=${PHP_FPM_INSTALL_SSHPASS}
|
||||
- ADDITIONAL_LOCALES=${PHP_FPM_ADDITIONAL_LOCALES}
|
||||
- INSTALL_FFMPEG=${PHP_FPM_FFMPEG}
|
||||
- http_proxy
|
||||
- https_proxy
|
||||
- no_proxy
|
||||
volumes:
|
||||
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
|
||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
|
||||
@ -198,6 +218,11 @@ services:
|
||||
- INSTALL_ZIP_ARCHIVE=${PHP_WORKER_INSTALL_ZIP_ARCHIVE}
|
||||
- INSTALL_MYSQL_CLIENT=${PHP_WORKER_INSTALL_MYSQL_CLIENT}
|
||||
- INSTALL_AMQP=${PHP_WORKER_INSTALL_AMQP}
|
||||
- INSTALL_GHOSTSCRIPT=${PHP_WORKER_INSTALL_GHOSTSCRIPT}
|
||||
- INSTALL_SWOOLE=${PHP_WORKER_INSTALL_SWOOLE}
|
||||
- INSTALL_TAINT=${PHP_WORKER_INSTALL_TAINT}
|
||||
- INSTALL_FFMPEG=${PHP_WORKER_INSTALL_FFMPEG}
|
||||
- INSTALL_GMP=${PHP_WORKER_INSTALL_GMP}
|
||||
- PUID=${PHP_WORKER_PUID}
|
||||
- PGID=${PHP_WORKER_PGID}
|
||||
volumes:
|
||||
@ -236,6 +261,9 @@ services:
|
||||
- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
|
||||
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
|
||||
- CHANGE_SOURCE=${CHANGE_SOURCE}
|
||||
- http_proxy
|
||||
- https_proxy
|
||||
- no_proxy
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
|
||||
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx
|
||||
@ -365,7 +393,12 @@ services:
|
||||
|
||||
### MariaDB ##############################################
|
||||
mariadb:
|
||||
build: ./mariadb
|
||||
build:
|
||||
context: ./mariadb
|
||||
args:
|
||||
- http_proxy
|
||||
- https_proxy
|
||||
- no_proxy
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/mariadb:/var/lib/mysql
|
||||
- ${MARIADB_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
|
||||
@ -399,6 +432,10 @@ services:
|
||||
- JUPYTERHUB_POSTGRES_USER=${JUPYTERHUB_POSTGRES_USER}
|
||||
- JUPYTERHUB_POSTGRES_PASSWORD=${JUPYTERHUB_POSTGRES_PASSWORD}
|
||||
- JUPYTERHUB_POSTGRES_DB=${JUPYTERHUB_POSTGRES_DB}
|
||||
- SONARQUBE_POSTGRES_INIT=${SONARQUBE_POSTGRES_INIT}
|
||||
- SONARQUBE_POSTGRES_DB=${SONARQUBE_POSTGRES_DB}
|
||||
- SONARQUBE_POSTGRES_USER=${SONARQUBE_POSTGRES_USER}
|
||||
- SONARQUBE_POSTGRES_PASSWORD=${SONARQUBE_POSTGRES_PASSWORD}
|
||||
networks:
|
||||
- backend
|
||||
|
||||
@ -489,6 +526,10 @@ services:
|
||||
- "${AEROSPIKE_FABRIC_PORT}:3001"
|
||||
- "${AEROSPIKE_HEARTBEAT_PORT}:3002"
|
||||
- "${AEROSPIKE_INFO_PORT}:3003"
|
||||
environment:
|
||||
- STORAGE_GB=${AEROSPIKE_STORAGE_GB}
|
||||
- MEM_GB=${AEROSPIKE_MEM_GB}
|
||||
- NAMESPACE=${AEROSPIKE_NAMESPACE}
|
||||
networks:
|
||||
- backend
|
||||
|
||||
@ -593,11 +634,14 @@ services:
|
||||
|
||||
### pgAdmin ##############################################
|
||||
pgadmin:
|
||||
build: ./pgadmin
|
||||
image: dpage/pgadmin4:latest
|
||||
environment:
|
||||
- "PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}"
|
||||
- "PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}"
|
||||
ports:
|
||||
- "5050:5050"
|
||||
- "${PGADMIN_PORT}:80"
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/pgadmin-backup:/var/lib/pgadmin/storage/pgadmin4
|
||||
- ${DATA_PATH_HOST}/pgadmin:/var/lib/pgadmin
|
||||
depends_on:
|
||||
- postgres
|
||||
networks:
|
||||
@ -1399,3 +1443,41 @@ services:
|
||||
- "${COUCHDB_PORT}:5984"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### Manticore Search ###########################################
|
||||
manticore:
|
||||
build:
|
||||
context: ./manticore
|
||||
volumes:
|
||||
- ${MANTICORE_CONFIG_PATH}:/etc/sphinxsearch
|
||||
- ${DATA_PATH_HOST}/manticore/data:/var/lib/manticore/data
|
||||
- ${DATA_PATH_HOST}/manticore/log:/var/lib/manticore/log
|
||||
ports:
|
||||
- "${MANTICORE_API_PORT}:9312"
|
||||
- "${MANTICORE_SPHINXQL_PORT}:9306"
|
||||
- "${MANTICORE_HTTP_PORT}:9308"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### SONARQUBE ################################################
|
||||
sonarqube:
|
||||
build:
|
||||
context: ./sonarqube
|
||||
hostname: "${SONARQUBE_HOSTNAME}"
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/sonarqube/conf:/opt/sonarqube/conf
|
||||
- ${DATA_PATH_HOST}/sonarqube/data:/opt/sonarqube/data
|
||||
- ${DATA_PATH_HOST}/sonarqube/logs:/opt/sonarqube/logs
|
||||
- ${DATA_PATH_HOST}/sonarqube/extensions:/opt/sonarqube/extensions
|
||||
- ${DATA_PATH_HOST}/sonarqube/plugins:/opt/sonarqube/lib/bundled-plugins
|
||||
ports:
|
||||
- ${SONARQUBE_PORT}:9000
|
||||
depends_on:
|
||||
- postgres
|
||||
environment:
|
||||
- sonar.jdbc.username=${SONARQUBE_POSTGRES_USER}
|
||||
- sonar.jdbc.password=${SONARQUBE_POSTGRES_PASSWORD}
|
||||
- sonar.jdbc.url=jdbc:postgresql://${SONARQUBE_POSTGRES_HOST}:5432/${SONARQUBE_POSTGRES_DB}
|
||||
networks:
|
||||
- backend
|
||||
- frontend
|
||||
|
53
env-example
53
env-example
@ -121,6 +121,7 @@ WORKSPACE_INSTALL_LINUXBREW=false
|
||||
WORKSPACE_INSTALL_MC=false
|
||||
WORKSPACE_INSTALL_SYMFONY=false
|
||||
WORKSPACE_INSTALL_PYTHON=false
|
||||
WORKSPACE_INSTALL_POWERLINE=false
|
||||
WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false
|
||||
WORKSPACE_INSTALL_IMAGEMAGICK=false
|
||||
WORKSPACE_INSTALL_TERRAFORM=false
|
||||
@ -128,14 +129,21 @@ WORKSPACE_INSTALL_DUSK_DEPS=false
|
||||
WORKSPACE_INSTALL_PG_CLIENT=false
|
||||
WORKSPACE_INSTALL_PHALCON=false
|
||||
WORKSPACE_INSTALL_SWOOLE=false
|
||||
WORKSPACE_INSTALL_TAINT=false
|
||||
WORKSPACE_INSTALL_LIBPNG=false
|
||||
WORKSPACE_INSTALL_IONCUBE=false
|
||||
WORKSPACE_INSTALL_MYSQL_CLIENT=false
|
||||
WORKSPACE_INSTALL_PING=false
|
||||
WORKSPACE_INSTALL_SSHPASS=false
|
||||
WORKSPACE_INSTALL_INOTIFY=false
|
||||
WORKSPACE_INSTALL_FSWATCH=false
|
||||
WORKSPACE_PUID=1000
|
||||
WORKSPACE_PGID=1000
|
||||
WORKSPACE_CHROME_DRIVER_VERSION=2.42
|
||||
WORKSPACE_TIMEZONE=UTC
|
||||
WORKSPACE_SSH_PORT=2222
|
||||
WORKSPACE_INSTALL_FFMPEG=false
|
||||
WORKSPACE_INSTALL_GNU_PARALLEL=false
|
||||
|
||||
### PHP_FPM ###############################################
|
||||
|
||||
@ -148,6 +156,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_XHPROF=false
|
||||
PHP_FPM_INSTALL_PHPDBG=false
|
||||
PHP_FPM_INSTALL_IMAP=false
|
||||
PHP_FPM_INSTALL_MONGO=false
|
||||
@ -164,16 +173,22 @@ PHP_FPM_INSTALL_GHOSTSCRIPT=false
|
||||
PHP_FPM_INSTALL_LDAP=false
|
||||
PHP_FPM_INSTALL_PHALCON=false
|
||||
PHP_FPM_INSTALL_SWOOLE=false
|
||||
PHP_FPM_INSTALL_TAINT=false
|
||||
PHP_FPM_INSTALL_PG_CLIENT=false
|
||||
PHP_FPM_INSTALL_POSTGIS=false
|
||||
PHP_FPM_INSTALL_PCNTL=false
|
||||
PHP_FPM_INSTALL_CALENDAR=false
|
||||
PHP_FPM_INSTALL_FAKETIME=false
|
||||
PHP_FPM_INSTALL_IONCUBE=false
|
||||
PHP_FPM_INSTALL_RDKAFKA=false
|
||||
PHP_FPM_FAKETIME=-0
|
||||
PHP_FPM_INSTALL_APCU=false
|
||||
PHP_FPM_INSTALL_YAML=false
|
||||
PHP_FPM_INSTALL_ADDITIONAL_LOCALES=false
|
||||
PHP_FPM_INSTALL_MYSQL_CLIENT=false
|
||||
PHP_FPM_INSTALL_PING=false
|
||||
PHP_FPM_INSTALL_SSHPASS=false
|
||||
PHP_FPM_FFMPEG=false
|
||||
PHP_FPM_ADDITIONAL_LOCALES="es_ES.UTF-8 fr_FR.UTF-8"
|
||||
|
||||
### PHP_WORKER ############################################
|
||||
@ -185,6 +200,12 @@ PHP_WORKER_INSTALL_SOAP=false
|
||||
PHP_WORKER_INSTALL_ZIP_ARCHIVE=false
|
||||
PHP_WORKER_INSTALL_MYSQL_CLIENT=false
|
||||
PHP_WORKER_INSTALL_AMQP=false
|
||||
PHP_WORKER_INSTALL_GHOSTSCRIPT=false
|
||||
PHP_WORKER_INSTALL_SWOOLE=false
|
||||
PHP_WORKER_INSTALL_TAINT=false
|
||||
PHP_WORKER_INSTALL_FFMPEG=false
|
||||
PHP_WORKER_INSTALL_GMP=false
|
||||
|
||||
PHP_WORKER_PUID=1000
|
||||
PHP_WORKER_PGID=1000
|
||||
|
||||
@ -373,6 +394,9 @@ AEROSPIKE_SERVICE_PORT=3000
|
||||
AEROSPIKE_FABRIC_PORT=3001
|
||||
AEROSPIKE_HEARTBEAT_PORT=3002
|
||||
AEROSPIKE_INFO_PORT=3003
|
||||
AEROSPIKE_STORAGE_GB=1
|
||||
AEROSPIKE_MEM_GB=1
|
||||
AEROSPIKE_NAMESPACE=test
|
||||
|
||||
### RETHINKDB #############################################
|
||||
|
||||
@ -657,3 +681,32 @@ MOSQUITTO_PORT=9001
|
||||
### COUCHDB ###################################################
|
||||
|
||||
COUCHDB_PORT=5984
|
||||
|
||||
### Manticore Search ##########################################
|
||||
|
||||
MANTICORE_CONFIG_PATH=./manticore/config
|
||||
MANTICORE_API_PORT=9312
|
||||
MANTICORE_SPHINXQL_PORT=9306
|
||||
MANTICORE_HTTP_PORT=9308
|
||||
|
||||
### pgadmin ##################################################
|
||||
# use this address http://ip6-localhost:5050
|
||||
PGADMIN_PORT=5050
|
||||
PGADMIN_DEFAULT_EMAIL=pgadmin4@pgadmin.org
|
||||
PGADMIN_DEFAULT_PASSWORD=admin
|
||||
|
||||
### SONARQUBE ################################################
|
||||
## docker-compose up -d sonarqube
|
||||
## (If you encounter a database error)
|
||||
## docker-compose exec --user=root postgres
|
||||
## source docker-entrypoint-initdb.d/init_sonarqube_db.sh
|
||||
## (If you encounter logs error)
|
||||
## docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs
|
||||
|
||||
SONARQUBE_HOSTNAME=sonar.example.com
|
||||
SONARQUBE_PORT=9000
|
||||
SONARQUBE_POSTGRES_INIT=true
|
||||
SONARQUBE_POSTGRES_HOST=postgres
|
||||
SONARQUBE_POSTGRES_DB=sonar
|
||||
SONARQUBE_POSTGRES_USER=sonar
|
||||
SONARQUBE_POSTGRES_PASSWORD=sonarPass
|
||||
|
@ -19,4 +19,4 @@ RUN npm install
|
||||
COPY laravel-echo-server.json /usr/src/app/laravel-echo-server.json
|
||||
|
||||
EXPOSE 3000
|
||||
CMD [ "npm", "start" ]
|
||||
CMD [ "npm", "start", "--force" ]
|
||||
|
@ -4,7 +4,7 @@
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"laravel-echo-server": "^1.2.8"
|
||||
"laravel-echo-server": "^1.5.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "laravel-echo-server start"
|
||||
|
@ -20,7 +20,8 @@ RUN apk --update add wget \
|
||||
autoconf \
|
||||
cyrus-sasl-dev \
|
||||
libgsasl-dev \
|
||||
supervisor
|
||||
supervisor \
|
||||
procps
|
||||
|
||||
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
|
||||
RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 && docker-php-ext-enable memcached
|
||||
|
5
manticore/Dockerfile
Normal file
5
manticore/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM manticoresearch/manticore
|
||||
|
||||
EXPOSE 9306
|
||||
EXPOSE 9308
|
||||
EXPOSE 9312
|
25
manticore/config/sphinx.conf
Normal file
25
manticore/config/sphinx.conf
Normal file
@ -0,0 +1,25 @@
|
||||
index testrt {
|
||||
type = rt
|
||||
rt_mem_limit = 128M
|
||||
path = /var/lib/manticore/data/testrt
|
||||
rt_field = title
|
||||
rt_field = content
|
||||
rt_attr_uint = gid
|
||||
}
|
||||
|
||||
searchd {
|
||||
listen = 9312
|
||||
listen = 9308:http
|
||||
listen = 9306:mysql41
|
||||
log = /var/lib/manticore/log/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
|
||||
read_timeout = 5
|
||||
max_children = 30
|
||||
pid_file = /var/run/searchd.pid
|
||||
seamless_rotate = 1
|
||||
preopen_indexes = 1
|
||||
unlink_old = 1
|
||||
binlog_path = /var/lib/manticore/data
|
||||
}
|
||||
|
@ -14,13 +14,23 @@ RUN if [ ${CHANGE_SOURCE} = true ]; then \
|
||||
|
||||
RUN apk update \
|
||||
&& apk upgrade \
|
||||
&& apk --update add logrotate \
|
||||
&& apk add --no-cache openssl \
|
||||
&& apk add --no-cache bash \
|
||||
&& adduser -D -H -u 1000 -s /bin/bash www-data
|
||||
&& apk add --no-cache bash
|
||||
|
||||
RUN set -x ; \
|
||||
addgroup -g 82 -S www-data ; \
|
||||
adduser -u 82 -D -S -G www-data www-data && exit 0 ; exit 1
|
||||
|
||||
ARG PHP_UPSTREAM_CONTAINER=php-fpm
|
||||
ARG PHP_UPSTREAM_PORT=9000
|
||||
|
||||
# Create 'messages' file used from 'logrotate'
|
||||
RUN touch /var/log/messages
|
||||
|
||||
# Copy 'logrotate' config file
|
||||
COPY logrotate/nginx /etc/logrotate.d/
|
||||
|
||||
# Set upstream conf and remove the default conf
|
||||
RUN echo "upstream php-upstream { server ${PHP_UPSTREAM_CONTAINER}:${PHP_UPSTREAM_PORT}; }" > /etc/nginx/conf.d/upstream.conf \
|
||||
&& rm /etc/nginx/conf.d/default.conf
|
||||
|
14
nginx/logrotate/nginx
Normal file
14
nginx/logrotate/nginx
Normal file
@ -0,0 +1,14 @@
|
||||
/var/log/nginx/*.log {
|
||||
daily
|
||||
missingok
|
||||
rotate 32
|
||||
compress
|
||||
delaycompress
|
||||
nodateext
|
||||
notifempty
|
||||
create 644 www-data root
|
||||
sharedscripts
|
||||
postrotate
|
||||
[ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
|
||||
endscript
|
||||
}
|
1
nginx/ssl/.gitignore
vendored
1
nginx/ssl/.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
*.crt
|
||||
*.csr
|
||||
*.key
|
||||
*.pem
|
@ -6,4 +6,8 @@ if [ ! -f /etc/nginx/ssl/default.crt ]; then
|
||||
openssl x509 -req -days 365 -in "/etc/nginx/ssl/default.csr" -signkey "/etc/nginx/ssl/default.key" -out "/etc/nginx/ssl/default.crt"
|
||||
fi
|
||||
|
||||
# Start crond in background
|
||||
crond -l 2 -b
|
||||
|
||||
# Start nginx in foreground
|
||||
nginx
|
||||
|
@ -1,10 +0,0 @@
|
||||
FROM fenglc/pgadmin4:alpine
|
||||
|
||||
LABEL maintainer="Huadong Zuo <admin@zuohuadong.cn>"
|
||||
|
||||
# user: pgadmin4@pgadmin.org
|
||||
# password: admin
|
||||
# pg_dump & postgresql all in "/usr/bin"
|
||||
# backup in "/var/lib/pgadmin/storage/pgadmin4"
|
||||
|
||||
EXPOSE 5050
|
@ -128,13 +128,17 @@ RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_PG_CLIENT=false
|
||||
ARG INSTALL_POSTGIS=false
|
||||
|
||||
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||
# Create folders if not exists (https://github.com/tianon/docker-brew-debian/issues/65)
|
||||
mkdir -p /usr/share/man/man1 && \
|
||||
mkdir -p /usr/share/man/man7 && \
|
||||
# Install the pgsql client
|
||||
apt-get install -y postgresql-client \
|
||||
apt-get install -y postgresql-client && \
|
||||
if [ ${INSTALL_POSTGIS} = true ]; then \
|
||||
apt-get install -y postgis; \
|
||||
fi \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
@ -219,6 +223,21 @@ RUN if [ ${INSTALL_SWOOLE} = true ]; then \
|
||||
&& php -m | grep -q 'swoole' \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Taint EXTENSION
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_TAINT=false
|
||||
|
||||
RUN if [ ${INSTALL_TAINT} = true ]; then \
|
||||
# Install Php TAINT Extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
|
||||
pecl install taint && \
|
||||
docker-php-ext-enable taint && \
|
||||
php -m | grep -q 'taint'; \
|
||||
fi \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# MongoDB:
|
||||
###########################################################################
|
||||
@ -235,6 +254,34 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
docker-php-ext-enable mongodb \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Xhprof:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_XHPROF=false
|
||||
|
||||
RUN if [ ${INSTALL_XHPROF} = true ]; then \
|
||||
# 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.6.tar.gz"; \
|
||||
else \
|
||||
curl -L -o /tmp/xhprof.tar.gz "https://codeload.github.com/phacility/xhprof/tar.gz/master"; \
|
||||
fi \
|
||||
&& mkdir -p xhprof \
|
||||
&& tar -C xhprof -zxvf /tmp/xhprof.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd xhprof \
|
||||
&& phpize \
|
||||
&& ./configure \
|
||||
&& make \
|
||||
&& make install \
|
||||
) \
|
||||
&& rm -r xhprof \
|
||||
&& rm /tmp/xhprof.tar.gz \
|
||||
;fi
|
||||
|
||||
COPY ./xhprof.ini /usr/local/etc/php/conf.d
|
||||
|
||||
###########################################################################
|
||||
# AMQP:
|
||||
###########################################################################
|
||||
@ -598,6 +645,18 @@ RUN if [ ${INSTALL_YAML} = true ]; then \
|
||||
docker-php-ext-enable yaml \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# RDKAFKA:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_RDKAFKA=false
|
||||
|
||||
RUN if [ ${INSTALL_RDKAFKA} = true ]; then \
|
||||
apt-get install -y librdkafka-dev && \
|
||||
pecl install rdkafka && \
|
||||
docker-php-ext-enable rdkafka \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Install additional locales:
|
||||
###########################################################################
|
||||
@ -627,6 +686,45 @@ RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
|
||||
apt-get -y install mysql-client \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# ping:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_PING=false
|
||||
|
||||
RUN if [ ${INSTALL_PING} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install inetutils-ping \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# sshpass:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_SSHPASS=false
|
||||
|
||||
RUN if [ ${INSTALL_SSHPASS} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install sshpass \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# FFMPEG:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_FFMPEG=false
|
||||
|
||||
RUN if [ ${INSTALL_FFMPEG} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install ffmpeg \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Check PHP version:
|
||||
###########################################################################
|
||||
|
@ -1,9 +1,9 @@
|
||||
; NOTE: The actual opcache.so extention is NOT SET HERE but rather (/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini)
|
||||
|
||||
opcache.enable="1"
|
||||
opcache.memory_consumption="256"
|
||||
opcache.use_cwd="0"
|
||||
opcache.max_file_size="0"
|
||||
opcache.max_accelerated_files = 30000
|
||||
opcache.validate_timestamps="1"
|
||||
opcache.revalidate_freq="0"
|
||||
opcache.enable=1
|
||||
opcache.memory_consumption=256
|
||||
opcache.use_cwd=0
|
||||
opcache.max_file_size=0
|
||||
opcache.max_accelerated_files=30000
|
||||
opcache.validate_timestamps=1
|
||||
opcache.revalidate_freq=0
|
||||
|
8
php-fpm/xhprof.ini
Normal file
8
php-fpm/xhprof.ini
Normal file
@ -0,0 +1,8 @@
|
||||
[xhprof]
|
||||
; extension=xhprof.so
|
||||
extension=tideways.so
|
||||
xhprof.output_dir=/var/www/xhprof
|
||||
; no need to autoload, control in the program
|
||||
tideways.auto_prepend_library=0
|
||||
; set default rate
|
||||
tideways.sample_rate=100
|
@ -69,6 +69,12 @@ RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
|
||||
apk --update add mysql-client \
|
||||
;fi
|
||||
|
||||
# Install FFMPEG:
|
||||
ARG INSTALL_FFMPEG=false
|
||||
RUN if [ ${INSTALL_FFMPEG} = true ]; then \
|
||||
apk --update add ffmpeg \
|
||||
;fi
|
||||
|
||||
# Install AMQP:
|
||||
ARG INSTALL_AMQP=false
|
||||
|
||||
@ -93,9 +99,56 @@ RUN if [ $INSTALL_PHALCON = true ]; then \
|
||||
&& rm -rf /tmp/cphalcon* \
|
||||
;fi
|
||||
|
||||
RUN if [ $INSTALL_GHOSTSCRIPT = true ]; then \
|
||||
apk --update add ghostscript \
|
||||
;fi
|
||||
|
||||
#Install GMP package:
|
||||
ARG INSTALL_GMP=false
|
||||
RUN if [ ${INSTALL_GMP} = true ]; then \
|
||||
apk add --update --no-cache gmp gmp-dev \
|
||||
&& docker-php-ext-install gmp \
|
||||
;fi
|
||||
|
||||
|
||||
RUN rm /var/cache/apk/* \
|
||||
&& mkdir -p /var/www
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Swoole EXTENSION
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_SWOOLE=false
|
||||
|
||||
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
|
||||
# Install Php Swoole Extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
pecl -q install swoole-2.0.10; \
|
||||
else \
|
||||
if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
|
||||
pecl install swoole-2.2.0; \
|
||||
else \
|
||||
pecl install swoole; \
|
||||
fi \
|
||||
fi \
|
||||
&& docker-php-ext-enable swoole \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Taint EXTENSION
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_TAINT=false
|
||||
|
||||
RUN if [ ${INSTALL_TAINT} = true ]; then \
|
||||
# Install Php TAINT Extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
|
||||
pecl install taint; \
|
||||
fi && \
|
||||
docker-php-ext-enable taint \
|
||||
;fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Optional Supervisord Configuration
|
||||
|
@ -1,3 +1,4 @@
|
||||
*.sh
|
||||
!init_gitlab_db.sh
|
||||
!init_jupyterhub_db.sh
|
||||
!init_sonarqube_db.sh
|
||||
|
@ -33,7 +33,7 @@
|
||||
# EOSQL
|
||||
#
|
||||
### default database and user for jupyterhub ##############################################
|
||||
if [ $JUPYTERHUB_POSTGRES_INIT == 'true' ]; then
|
||||
if [ "$JUPYTERHUB_POSTGRES_INIT" == 'true' ]; then
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
CREATE USER $JUPYTERHUB_POSTGRES_USER WITH PASSWORD '$JUPYTERHUB_POSTGRES_PASSWORD';
|
||||
CREATE DATABASE $JUPYTERHUB_POSTGRES_DB;
|
||||
|
44
postgres/docker-entrypoint-initdb.d/init_sonarqube_db.sh
Normal file
44
postgres/docker-entrypoint-initdb.d/init_sonarqube_db.sh
Normal file
@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copy createdb.sh.example to createdb.sh
|
||||
# then uncomment then set database name and username to create you need databases
|
||||
#
|
||||
# example: .env POSTGRES_USER=appuser and need db name is myshop_db
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER myuser WITH PASSWORD 'mypassword';
|
||||
# CREATE DATABASE myshop_db;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE myshop_db TO myuser;
|
||||
# EOSQL
|
||||
#
|
||||
# this sh script will auto run when the postgres container starts and the $DATA_PATH_HOST/postgres not found.
|
||||
#
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db1 WITH PASSWORD 'db1';
|
||||
# CREATE DATABASE db1;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db1 TO db1;
|
||||
# EOSQL
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db2 WITH PASSWORD 'db2';
|
||||
# CREATE DATABASE db2;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db2 TO db2;
|
||||
# EOSQL
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db3 WITH PASSWORD 'db3';
|
||||
# CREATE DATABASE db3;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db3 TO db3;
|
||||
# EOSQL
|
||||
#
|
||||
### default database and user for gitlab ##############################################
|
||||
if [ "$SONARQUBE_POSTGRES_INIT" == 'true' ]; then
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
CREATE USER $SONARQUBE_POSTGRES_USER WITH PASSWORD '$SONARQUBE_POSTGRES_PASSWORD';
|
||||
CREATE DATABASE $SONARQUBE_POSTGRES_DB;
|
||||
GRANT ALL PRIVILEGES ON DATABASE $SONARQUBE_POSTGRES_DB TO $SONARQUBE_POSTGRES_USER;
|
||||
ALTER ROLE $SONARQUBE_POSTGRES_USER CREATEROLE SUPERUSER;
|
||||
EOSQL
|
||||
echo
|
||||
fi
|
3
sonarqube/Dockerfile
Normal file
3
sonarqube/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM sonarqube:latest
|
||||
|
||||
LABEL maintainer="xiagw <fxiaxiaoyu@gmail.com>"
|
@ -30,6 +30,9 @@ if [ -n "${PHP_VERSION}" ]; then
|
||||
# memcached extension does not yet support PHP 7.3.
|
||||
sed -i -- 's/PHP_FPM_INSTALL_MEMCACHED=true/PHP_FPM_INSTALL_MEMCACHED=false/g' .env
|
||||
fi
|
||||
|
||||
sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env
|
||||
|
||||
cat .env
|
||||
docker-compose build ${BUILD_SERVICE}
|
||||
docker images
|
||||
|
@ -345,7 +345,7 @@ ARG BLACKFIRE_CLIENT_TOKEN
|
||||
ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
|
||||
|
||||
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
curl -L https://packagecloud.io/gpg.key | apt-key add - && \
|
||||
curl -L https://packages.blackfire.io/gpg.key | apt-key add - && \
|
||||
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
|
||||
apt-get update -yqq && \
|
||||
apt-get install blackfire-agent \
|
||||
@ -435,6 +435,22 @@ RUN if [ ${INSTALL_SWOOLE} = true ]; then \
|
||||
&& php -m | grep -q 'swoole' \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Taint EXTENSION
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_TAINT=false
|
||||
|
||||
RUN if [ "${INSTALL_TAINT}" = true ]; then \
|
||||
# Install Php TAINT Extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
|
||||
pecl install taint && \
|
||||
echo "extension=taint.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/taint.ini && \
|
||||
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/taint.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-taint.ini && \
|
||||
php -m | grep -q 'taint'; \
|
||||
fi \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Libpng16 EXTENSION
|
||||
###########################################################################
|
||||
@ -446,6 +462,31 @@ RUN if [ ${INSTALL_LIBPNG} = true ]; then \
|
||||
apt-get install libpng16-16 \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Inotify EXTENSION:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_INOTIFY=false
|
||||
|
||||
RUN if [ ${INSTALL_INOTIFY} = true ]; then \
|
||||
pecl -q install inotify && \
|
||||
echo "extension=inotify.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/inotify.ini && \
|
||||
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/inotify.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-inotify.ini \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# fswatch
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_FSWATCH=false
|
||||
|
||||
RUN if [ ${INSTALL_FSWATCH} = true ]; then \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 47FE03C1 \
|
||||
&& add-apt-repository -y ppa:hadret/fswatch \
|
||||
|| apt-get update -yqq \
|
||||
&& apt-get -y install fswatch \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# IonCube Loader
|
||||
###########################################################################
|
||||
@ -846,6 +887,23 @@ RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
||||
&& python -m pip install --upgrade virtualenv \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# POWERLINE:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
ARG INSTALL_POWERLINE=false
|
||||
|
||||
RUN if [ ${INSTALL_POWERLINE} = true ]; then \
|
||||
if [ ${INSTALL_PYTHON} = true ]; then \
|
||||
python -m pip install --upgrade powerline-status && \
|
||||
echo "" >> /etc/bash.bashrc && \
|
||||
echo ". /usr/local/lib/python2.7/dist-packages/powerline/bindings/bash/powerline.sh" >> /etc/bash.bashrc \
|
||||
;fi \
|
||||
;fi
|
||||
|
||||
USER laradock
|
||||
|
||||
###########################################################################
|
||||
# ImageMagick:
|
||||
###########################################################################
|
||||
@ -948,6 +1006,57 @@ RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
|
||||
apt-get -y install mysql-client \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# ping:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_PING=false
|
||||
|
||||
RUN if [ ${INSTALL_PING} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install inetutils-ping \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# sshpass:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_SSHPASS=false
|
||||
|
||||
RUN if [ ${INSTALL_SSHPASS} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install sshpass \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# FFMpeg:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_FFMPEG=false
|
||||
|
||||
RUN if [ ${INSTALL_FFMPEG} = true ]; then \
|
||||
apt-get -y install ffmpeg \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# GNU Parallel:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_GNU_PARALLEL=false
|
||||
|
||||
RUN if [ ${INSTALL_GNU_PARALLEL} = true ]; then \
|
||||
apt-get -y install parallel \
|
||||
;fi
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Check PHP version:
|
||||
###########################################################################
|
||||
|
Reference in New Issue
Block a user