|
@@ -61,7 +61,7 @@ docker-compose down
|
|
|
|
|
|
> Run commands in a running Container.
|
|
|
|
|
|
-1 - First list the current running containers with `docker ps`
|
|
|
+1 - First list the currently running containers with `docker ps`
|
|
|
|
|
|
2 - Enter any container using:
|
|
|
|
|
@@ -220,9 +220,9 @@ The PHP-CLI extensions should be installed in `workspace/Dockerfile`.
|
|
|
<br>
|
|
|
<a name="Change-the-PHP-FPM-Version"></a>
|
|
|
## Change the (PHP-FPM) Version
|
|
|
-By default the latest stable PHP versin is configured to run.
|
|
|
+By default the latest stable PHP version is configured to run.
|
|
|
|
|
|
->The PHP-FPM is responsible of serving your application code, you don't have to change the PHP-CLI version if you are planning to run your application on different PHP-FPM version.
|
|
|
+>The PHP-FPM is responsible for serving your application code, you don't have to change the PHP-CLI version if you are planning to run your application on different PHP-FPM version.
|
|
|
|
|
|
|
|
|
### A) Switch from PHP `7.2` to PHP `5.6`
|
|
@@ -256,7 +256,7 @@ docker-compose build php-fpm
|
|
|
|
|
|
>Note: it's not very essential to edit the PHP-CLI version. The PHP-CLI is only used for the Artisan Commands & Composer. It doesn't serve your Application code, this is the PHP-FPM job.
|
|
|
|
|
|
-The PHP-CLI is installed in the Workspace container. To change the PHP-CLI version you need to simply change the `PHP_VERSION` in te .env file as follow:
|
|
|
+The PHP-CLI is installed in the Workspace container. To change the PHP-CLI version you need to simply change the `PHP_VERSION` in the .env file as follow:
|
|
|
|
|
|
1 - Open the `.env`.
|
|
|
|
|
@@ -309,7 +309,7 @@ To control the behavior of xDebug (in the `php-fpm` Container), you can run the
|
|
|
- Start xDebug by default: `.php-fpm/xdebug start`.
|
|
|
- See the status: `.php-fpm/xdebug status`.
|
|
|
|
|
|
-Note: If `.php-fpm/xdebug` doesn't execute and gives `Permission Denied` error the problem can be that file `xdebug` doesn't have execution access. This can be fixed by running `chmod` command with desired access permissions.
|
|
|
+Note: If `.php-fpm/xdebug` doesn't execute and gives `Permission Denied` error the problem can be that file `xdebug` doesn't have execution access. This can be fixed by running `chmod` command with desired access permissions.
|
|
|
|
|
|
|
|
|
|
|
@@ -400,7 +400,7 @@ Always download the latest version of [Loaders for ionCube ](http://www.ioncube.
|
|
|
|
|
|
4 - Re-build the containers `docker-compose build workspace`
|
|
|
|
|
|
-[**Deployer Documentation Here**](https://deployer.org/docs)
|
|
|
+[**Deployer Documentation Here**](https://deployer.org/docs/getting-started.html)
|
|
|
|
|
|
|
|
|
|
|
@@ -509,7 +509,7 @@ Since the new Laravel application is in the `my-cool-app` folder, we need to rep
|
|
|
```dotenv
|
|
|
APP_CODE_PATH_HOST=../my-cool-app/
|
|
|
```
|
|
|
-4 - Go to that folder and start working..
|
|
|
+4 - Go to that folder and start working.
|
|
|
|
|
|
```bash
|
|
|
cd my-cool-app
|
|
@@ -624,6 +624,7 @@ docker-compose up -d php-worker
|
|
|
> Using Use Browsersync with Laravel Mix.
|
|
|
|
|
|
1. Add the following settings to your `webpack.mix.js` file. Please refer to Browsersync [Options](https://browsersync.io/docs/options) page for more options.
|
|
|
+
|
|
|
```
|
|
|
const mix = require('laravel-mix')
|
|
|
|
|
@@ -819,7 +820,7 @@ Read the [Laravel official documentation](https://laravel.com/docs/5.7/redis#con
|
|
|
|
|
|
## Use Varnish
|
|
|
|
|
|
-The goal was to proxy request to varnish server using nginx. So only nginx has been configured for Varnish proxy.
|
|
|
+The goal was to proxy the request to varnish server using nginx. So only nginx has been configured for Varnish proxy.
|
|
|
Nginx is on port 80 or 443. Nginx sends request through varnish server and varnish server sends request back to nginx on port 81 (external port is defined in `VARNISH_BACKEND_PORT`).
|
|
|
|
|
|
The idea was taken from this [post](https://www.linode.com/docs/websites/varnish/use-varnish-and-nginx-to-serve-wordpress-over-ssl-and-http-on-debian-8/)
|
|
@@ -952,7 +953,7 @@ More details about this [here](https://github.com/jenssegers/laravel-mongodb#ins
|
|
|
|
|
|
7 - Test it:
|
|
|
|
|
|
-- First let your Models extend from the Mongo Eloquent Model. Check the [documentation](https://github.com/jenssegers/laravel-mongodb#eloquent).
|
|
|
+- First, let your Models extend from the Mongo Eloquent Model. Check the [documentation](https://github.com/jenssegers/laravel-mongodb#eloquent).
|
|
|
- Enter the Workspace Container.
|
|
|
- Migrate the Database `php artisan migrate`.
|
|
|
|
|
@@ -977,7 +978,7 @@ docker-compose up -d mariadb phpmyadmin
|
|
|
|
|
|
*Note: To use with MariaDB, open `.env` and set `PMA_DB_ENGINE=mysql` to `PMA_DB_ENGINE=mariadb`.*
|
|
|
|
|
|
-2 - Open your browser and visit the localhost on port **8080**: `http://localhost:8080`
|
|
|
+2 - Open your browser and visit the localhost on port **8081**: `http://localhost:8081`
|
|
|
|
|
|
|
|
|
|
|
@@ -1057,7 +1058,7 @@ job1:
|
|
|
|
|
|
7 - Push changes to gitlab
|
|
|
|
|
|
-8 - Verify that pipeline is run successful
|
|
|
+8 - Verify that pipeline is running successfully
|
|
|
|
|
|
|
|
|
|
|
@@ -1074,7 +1075,7 @@ job1:
|
|
|
docker-compose up -d adminer
|
|
|
```
|
|
|
|
|
|
-2 - Open your browser and visit the localhost on port **8080**: `http://localhost:8080`
|
|
|
+2 - Open your browser and visit the localhost on port **8081**: `http://localhost:8081`
|
|
|
|
|
|
**Note:** We've locked Adminer to version 4.3.0 as at the time of writing [it contained a major bug](https://sourceforge.net/p/adminer/bugs-and-features/548/) preventing PostgreSQL users from logging in. If that bug is fixed (or if you're not using PostgreSQL) feel free to set Adminer to the latest version within [the Dockerfile](https://github.com/laradock/laradock/blob/master/adminer/Dockerfile#L1): `FROM adminer:latest`
|
|
|
|
|
@@ -1211,7 +1212,7 @@ docker-compose up -d elasticsearch
|
|
|
```bash
|
|
|
docker-compose exec elasticsearch /usr/share/elasticsearch/bin/plugin install {plugin-name}
|
|
|
```
|
|
|
-For ElasticSearch 5.0 and above, the previous "plugin" command as been renamed to "elasticsearch-plguin".
|
|
|
+For ElasticSearch 5.0 and above, the previous "plugin" command has been renamed to "elasticsearch-plguin".
|
|
|
Use the following instead:
|
|
|
|
|
|
```bash
|
|
@@ -1225,7 +1226,19 @@ docker-compose restart elasticsearch
|
|
|
```
|
|
|
|
|
|
|
|
|
+<br>
|
|
|
+<a name="Use-MeiliSearch"></a>
|
|
|
+## Use MeiliSearch
|
|
|
+
|
|
|
+1 - Run the MeiliSearch Container (`meilisearch`) with the `docker-compose up` command. Example:
|
|
|
+
|
|
|
+```bash
|
|
|
+docker-compose up -d meilisearch
|
|
|
+```
|
|
|
+
|
|
|
+2 - Open your browser and visit the localhost on port **7700** at the following URL: `http://localhost:7700`
|
|
|
|
|
|
+> The private API key is `masterkey`
|
|
|
|
|
|
|
|
|
|
|
@@ -1353,7 +1366,7 @@ For more documentation on Thumbor visit the [Thumbor documenation](http://thumbo
|
|
|
## Use AWS
|
|
|
|
|
|
1 - Configure AWS:
|
|
|
- - make sure to add your SSH keys in aws/ssh_keys folder
|
|
|
+ - make sure to add your SSH keys in aws-eb-cli/ssh_keys folder
|
|
|
|
|
|
2 - Run the Aws Container (`aws`) with the `docker-compose up` command. Example:
|
|
|
|
|
@@ -1425,30 +1438,13 @@ GRAYLOG_SHA256_PASSWORD=b1cb6e31e172577918c9e7806c572b5ed8477d3f57aa737bee4b5b1d
|
|
|
<a name="Use-Traefik"></a>
|
|
|
## Use Traefik
|
|
|
|
|
|
-To use Traefik you need to do some changes in `traefik/trafik.toml` and `docker-compose.yml`.
|
|
|
-
|
|
|
-1 - Open `traefik.toml` and change the `e-mail` property in `acme` section.
|
|
|
-
|
|
|
-2 - Change your domain in `acme.domains`. For example: `main = "example.org"`
|
|
|
+To use Traefik you need to do some changes in `.env` and `docker-compose.yml`.
|
|
|
|
|
|
-2.1 - If you have subdomains, you must add them to `sans` property in `acme.domains` section.
|
|
|
+1 - Open `.env` and change `ACME_DOMAIN` to your domain and `ACME_EMAIL` to your email.
|
|
|
|
|
|
-```bash
|
|
|
-[[acme.domais]]
|
|
|
- main = "example.org"
|
|
|
- sans = ["monitor.example.org", "pma.example.org"]
|
|
|
-```
|
|
|
+2 - You need to change the `docker-compose.yml` file to match the Traefik needs. If you want to use Traefik, you must not expose the ports of each container to the internet, but specify some labels.
|
|
|
|
|
|
-3 - If you need to add basic authentication (https://docs.traefik.io/configuration/entrypoints/#basic-authentication), you just need to add the following text after `[entryPoints.https.tls]`:
|
|
|
-
|
|
|
-```bash
|
|
|
-[entryPoints.https.auth.basic]
|
|
|
- users = ["user:password"]
|
|
|
-```
|
|
|
-
|
|
|
-4 - You need to change the `docker-compose.yml` file to match the Traefik needs. If you want to use Traefik, you must not expose the ports of each container to the internet, but specify some labels.
|
|
|
-
|
|
|
-4.1 For example, let's try with NGINX. You must have:
|
|
|
+2.1 For example, let's try with NGINX. You must have:
|
|
|
|
|
|
```bash
|
|
|
nginx:
|
|
@@ -1468,9 +1464,25 @@ nginx:
|
|
|
- frontend
|
|
|
- backend
|
|
|
labels:
|
|
|
- - traefik.backend=nginx
|
|
|
- - traefik.frontend.rule=Host:example.org
|
|
|
- - traefik.port=80
|
|
|
+ - "traefik.enable=true"
|
|
|
+ - "traefik.http.services.nginx.loadbalancer.server.port=80"
|
|
|
+ # https router
|
|
|
+ - "traefik.http.routers.https.rule=Host(`${ACME_DOMAIN}`, `www.${ACME_DOMAIN}`)"
|
|
|
+ - "traefik.http.routers.https.entrypoints=https"
|
|
|
+ - "traefik.http.routers.https.middlewares=www-redirectregex"
|
|
|
+ - "traefik.http.routers.https.service=nginx"
|
|
|
+ - "traefik.http.routers.https.tls.certresolver=letsencrypt"
|
|
|
+ # http router
|
|
|
+ - "traefik.http.routers.http.rule=Host(`${ACME_DOMAIN}`, `www.${ACME_DOMAIN}`)"
|
|
|
+ - "traefik.http.routers.http.entrypoints=http"
|
|
|
+ - "traefik.http.routers.http.middlewares=http-redirectscheme"
|
|
|
+ - "traefik.http.routers.http.service=nginx"
|
|
|
+ # middlewares
|
|
|
+ - "traefik.http.middlewares.www-redirectregex.redirectregex.permanent=true"
|
|
|
+ - "traefik.http.middlewares.www-redirectregex.redirectregex.regex=^https://www.(.*)"
|
|
|
+ - "traefik.http.middlewares.www-redirectregex.redirectregex.replacement=https://$$1"
|
|
|
+ - "traefik.http.middlewares.http-redirectscheme.redirectscheme.permanent=true"
|
|
|
+ - "traefik.http.middlewares.http-redirectscheme.redirectscheme.scheme=https"
|
|
|
```
|
|
|
|
|
|
instead of
|
|
@@ -1870,6 +1882,23 @@ To install NVM and NodeJS in the Workspace container
|
|
|
|
|
|
|
|
|
|
|
|
+<br>
|
|
|
+<a name="Install-PNPM"></a>
|
|
|
+## Install PNPM
|
|
|
+
|
|
|
+pnpm uses hard links and symlinks to save one version of a module only ever once on a disk. When using npm or Yarn for example, if you have 100 projects using the same version of lodash, you will have 100 copies of lodash on disk. With pnpm, lodash will be saved in a single place on the disk and a hard link will put it into the node_modules where it should be installed.
|
|
|
+
|
|
|
+As a result, you save gigabytes of space on your disk and you have a lot faster installations! If you'd like more details about the unique node_modules structure that pnpm creates and why it works fine with the Node.js ecosystem.
|
|
|
+More info here: https://pnpm.js.org/en/motivation
|
|
|
+
|
|
|
+1 - Open the `.env` file
|
|
|
+
|
|
|
+2 - Search for the `WORKSPACE_INSTALL_NODE` and `WORKSPACE_INSTALL_PNPM` argument under the Workspace Container and set it to `true`
|
|
|
+
|
|
|
+3 - Re-build the container `docker-compose build workspace`
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -1992,7 +2021,7 @@ To install FFMPEG in the Workspace container
|
|
|
|
|
|
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.
|
|
|
+**PS** Don't forget to install the binary in the `php-fpm` container too by applying the same steps above to its container, otherwise you'll get an error when running the `php-ffmpeg` binary.
|
|
|
|
|
|
|
|
|
<br>
|
|
@@ -2050,7 +2079,7 @@ To install Supervisor in the Workspace container
|
|
|
|
|
|
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`
|
|
|
+4 - Re-build the container `docker-compose build workspace` Or `docker-compose up --build -d workspace`
|
|
|
|
|
|
|
|
|
|
|
@@ -2169,6 +2198,32 @@ 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-RDKAFKA-php"></a>
|
|
|
+## Install RDKAFKA extension in php-fpm
|
|
|
+
|
|
|
+1 - Open the `.env` file
|
|
|
+<br>
|
|
|
+2 - Search for the `PHP_FPM_INSTALL_RDKAFKA` argument under the PHP-FPM container
|
|
|
+<br>
|
|
|
+3 - Set it to `true`
|
|
|
+<br>
|
|
|
+4 - Re-build the container `docker-compose build php-fpm`<br>
|
|
|
+
|
|
|
+
|
|
|
+<br>
|
|
|
+<a name="Install-RDKAFKA-workspace"></a>
|
|
|
+## Install RDKAFKA extension in workspace
|
|
|
+
|
|
|
+This is needed for 'composer install' if your dependencies require Kafka.
|
|
|
+
|
|
|
+1 - Open the `.env` file
|
|
|
+<br>
|
|
|
+2 - Search for the `WORKSPACE_INSTALL_RDKAFKA` argument under the WORKSPACE container
|
|
|
+<br>
|
|
|
+3 - Set it to `true`
|
|
|
+<br>
|
|
|
+4 - Re-build the container `docker-compose build workspace`<br>
|
|
|
|
|
|
|
|
|
<br>
|