Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
a1d3eeb7e6 | |||
b2f7348552 | |||
ebeddcba23 | |||
dba37307b5 | |||
2af5b2ff49 | |||
93d5b318fe | |||
9ce470e14e | |||
38fb49bccc | |||
08896f9fb6 | |||
dcab211b07 | |||
76001daf71 | |||
30b626d43e | |||
586a225c11 | |||
c099a51d52 | |||
245ddf3441 | |||
0192346cf2 | |||
e4f4de47e7 | |||
69ccd74d2e |
7
.github/README.md
vendored
7
.github/README.md
vendored
@ -22,9 +22,12 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Documentation
|
<p align="center">
|
||||||
|
<a href="http://laradock.io">
|
||||||
|
<img src="https://s19.postimg.org/ecnn9vdw3/Screen_Shot_2017-08-01_at_5.08.54_AM.png" width=300px" alt="Laradock Docs"/>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
[**Full Documentation Here**](http://laradock.io)
|
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@ weight: 3
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="List-current-running-Containers"></a>
|
<a name="List-current-running-Containers"></a>
|
||||||
## List current running Containers
|
## List current running Containers
|
||||||
```bash
|
```bash
|
||||||
@ -153,88 +155,8 @@ You might use the `--no-cache` option if you want full rebuilding (`docker-compo
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
|
||||||
<a name="Docker-Sync"></a>
|
|
||||||
|
|
||||||
## Speed up with docker-sync
|
|
||||||
|
|
||||||
Docker on the Mac [is slow](https://github.com/docker/for-mac/issues/77), at the time of writing. Especially for larger projects, this can be a problem. The problem is [older than March 2016](https://forums.docker.com/t/file-access-in-mounted-volumes-extremely-slow-cpu-bound/8076) - as it's a such a long-running issue, we're including it in the docs here.
|
|
||||||
|
|
||||||
In simple terms, docker-sync creates a docker container with a copy of all the application files that can be accessed very quickly from the other containers.
|
|
||||||
On the other hand, docker-sync runs a process on the host machine that continuously tracks and updates files changes from the host to this intermediate container.
|
|
||||||
|
|
||||||
Out of the box, it comes pre-configured for OS X, but using it on Windows is very easy to set-up by modifying the `DOCKER_SYNC_STRATEGY` on the `.env`
|
|
||||||
|
|
||||||
#### Usage
|
|
||||||
|
|
||||||
Laradock comes with `sync.sh`, an optional bash script, that automates installing, running and stopping docker-sync. Note that to run the bash script you may need to change the permissions `chmod 755 sync.sh`
|
|
||||||
|
|
||||||
1) Configure your Laradock environment as you would normally do and test your application to make sure that your sites are running correctly.
|
|
||||||
|
|
||||||
2) Make sure to set `DOCKER_SYNC_STRATEGY` on the `.env`. Read the [syncing strategies](https://github.com/EugenMayer/docker-sync/wiki/8.-Strategies) for details.
|
|
||||||
```
|
|
||||||
# osx: 'native_osx' (default)
|
|
||||||
# windows: 'unison'
|
|
||||||
# linux: docker-sync not required
|
|
||||||
|
|
||||||
DOCKER_SYNC_STRATEGY=native_osx
|
|
||||||
```
|
|
||||||
|
|
||||||
2) Install the docker-sync gem on the host-machine:
|
|
||||||
```bash
|
|
||||||
./sync.sh install
|
|
||||||
```
|
|
||||||
3) Start docker-sync and the Laradock environment.
|
|
||||||
Specify the services you want to run, as you would normally do with `docker-compose up`
|
|
||||||
```bash
|
|
||||||
./sync.sh up nginx mysql
|
|
||||||
```
|
|
||||||
Please note that the first time docker-sync runs, it will copy all the files to the intermediate container and that may take a very long time (15min+).
|
|
||||||
4) To stop the environment and docker-sync do:
|
|
||||||
```bash
|
|
||||||
./sync.sh down
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Setting up Aliases (optional)
|
|
||||||
|
|
||||||
You may create bash profile aliases to avoid having to remember and type these commands for everyday development.
|
|
||||||
Add the following lines to your `~/.bash_profile`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
alias devup="cd /PATH_TO_LARADOCK/laradock; ./sync.sh up nginx mysql" #add your services
|
|
||||||
alias devbash="cd /PATH_TO_LARADOCK/laradock; ./sync.sh bash"
|
|
||||||
alias devdown="cd /PATH_TO_LARADOCK/laradock; ./sync.sh down"
|
|
||||||
```
|
|
||||||
|
|
||||||
Now from any location on your machine, you can simply run `devup`, `devbash` and `devdown`.
|
|
||||||
|
|
||||||
|
|
||||||
#### Additional Commands
|
|
||||||
|
|
||||||
Opening bash on the workspace container (to run artisan for example):
|
|
||||||
```bash
|
|
||||||
./sync.sh bash
|
|
||||||
```
|
|
||||||
Manually triggering the synchronization of the files:
|
|
||||||
```bash
|
|
||||||
./sync.sh sync
|
|
||||||
```
|
|
||||||
Removing and cleaning up the files and the docker-sync container. Use only if you want to rebuild or remove docker-sync completely. The files on the host will be kept untouched.
|
|
||||||
```bash
|
|
||||||
./sync.sh clean
|
|
||||||
```
|
|
||||||
|
|
||||||
**Additional Notes:**
|
|
||||||
|
|
||||||
- You may run laradock with or without docker-sync at any time using with the same `.env` and `docker-compose.yml`, because the configuration is overridden automatically when docker-sync is used.
|
|
||||||
- You may inspect the `sync.sh` script to learn each of the commands and even add custom ones.
|
|
||||||
- If a container cannot access the files on docker-sync, you may need to set a user on the Dockerfile of that container with an id of 1000 (this is the UID that nginx and php-fpm have configured on laradock). Alternatively, you may change the permissions to 777, but this is **not** recommended.
|
|
||||||
|
|
||||||
Visit the [docker-sync documentation](https://github.com/EugenMayer/docker-sync/wiki) for more details.
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="Add-Docker-Images"></a>
|
<a name="Add-Docker-Images"></a>
|
||||||
|
|
||||||
## Add more Software (Docker Images)
|
## Add more Software (Docker Images)
|
||||||
|
|
||||||
To add an image (software), just edit the `docker-compose.yml` and add your container details, to do so you need to be familiar with the [docker compose file syntax](https://docs.docker.com/compose/compose-file/).
|
To add an image (software), just edit the `docker-compose.yml` and add your container details, to do so you need to be familiar with the [docker compose file syntax](https://docs.docker.com/compose/compose-file/).
|
||||||
@ -1494,7 +1416,11 @@ Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requ
|
|||||||
<a name="Speed-MacOS"></a>
|
<a name="Speed-MacOS"></a>
|
||||||
## Improve speed on MacOS
|
## Improve speed on MacOS
|
||||||
|
|
||||||
Sharing code into Docker containers with osxfs have very poor performance compared to Linux. Likely there are some workarounds:
|
Docker on the Mac [is slow](https://github.com/docker/for-mac/issues/77), at the time of writing. Especially for larger projects, this can be a problem. The problem is [older than March 2016](https://forums.docker.com/t/file-access-in-mounted-volumes-extremely-slow-cpu-bound/8076) - as it's a such a long-running issue, we're including it in the docs here.
|
||||||
|
|
||||||
|
So since sharing code into Docker containers with osxfs have very poor performance compared to Linux. Likely there are some workarounds:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Workaround A: using dinghy
|
### Workaround A: using dinghy
|
||||||
|
|
||||||
@ -1514,9 +1440,99 @@ Quick Setup giude, (we recommend you check their docs)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Docker-Sync"></a>
|
||||||
### Workaround B: using d4m-nfs
|
### Workaround B: using d4m-nfs
|
||||||
|
|
||||||
|
You can use the d4m-nfs solution in 2 ways, one is using the Laradock built it integration, and the other is using the tool separatly. Below is show case of both methods:
|
||||||
|
|
||||||
|
|
||||||
|
#### B.1: using the built in d4m-nfs integration
|
||||||
|
|
||||||
|
In simple terms, docker-sync creates a docker container with a copy of all the application files that can be accessed very quickly from the other containers.
|
||||||
|
On the other hand, docker-sync runs a process on the host machine that continuously tracks and updates files changes from the host to this intermediate container.
|
||||||
|
|
||||||
|
Out of the box, it comes pre-configured for OS X, but using it on Windows is very easy to set-up by modifying the `DOCKER_SYNC_STRATEGY` on the `.env`
|
||||||
|
|
||||||
|
##### Usage
|
||||||
|
|
||||||
|
Laradock comes with `sync.sh`, an optional bash script, that automates installing, running and stopping docker-sync. Note that to run the bash script you may need to change the permissions `chmod 755 sync.sh`
|
||||||
|
|
||||||
|
1) Configure your Laradock environment as you would normally do and test your application to make sure that your sites are running correctly.
|
||||||
|
|
||||||
|
2) Make sure to set `DOCKER_SYNC_STRATEGY` on the `.env`. Read the [syncing strategies](https://github.com/EugenMayer/docker-sync/wiki/8.-Strategies) for details.
|
||||||
|
```
|
||||||
|
# osx: 'native_osx' (default)
|
||||||
|
# windows: 'unison'
|
||||||
|
# linux: docker-sync not required
|
||||||
|
|
||||||
|
DOCKER_SYNC_STRATEGY=native_osx
|
||||||
|
```
|
||||||
|
|
||||||
|
2) Install the docker-sync gem on the host-machine:
|
||||||
|
```bash
|
||||||
|
./sync.sh install
|
||||||
|
```
|
||||||
|
3) Start docker-sync and the Laradock environment.
|
||||||
|
Specify the services you want to run, as you would normally do with `docker-compose up`
|
||||||
|
```bash
|
||||||
|
./sync.sh up nginx mysql
|
||||||
|
```
|
||||||
|
Please note that the first time docker-sync runs, it will copy all the files to the intermediate container and that may take a very long time (15min+).
|
||||||
|
4) To stop the environment and docker-sync do:
|
||||||
|
```bash
|
||||||
|
./sync.sh down
|
||||||
|
```
|
||||||
|
|
||||||
|
##### Setting up Aliases (optional)
|
||||||
|
|
||||||
|
You may create bash profile aliases to avoid having to remember and type these commands for everyday development.
|
||||||
|
Add the following lines to your `~/.bash_profile`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
alias devup="cd /PATH_TO_LARADOCK/laradock; ./sync.sh up nginx mysql" #add your services
|
||||||
|
alias devbash="cd /PATH_TO_LARADOCK/laradock; ./sync.sh bash"
|
||||||
|
alias devdown="cd /PATH_TO_LARADOCK/laradock; ./sync.sh down"
|
||||||
|
```
|
||||||
|
|
||||||
|
Now from any location on your machine, you can simply run `devup`, `devbash` and `devdown`.
|
||||||
|
|
||||||
|
|
||||||
|
##### Additional Commands
|
||||||
|
|
||||||
|
Opening bash on the workspace container (to run artisan for example):
|
||||||
|
```bash
|
||||||
|
./sync.sh bash
|
||||||
|
```
|
||||||
|
Manually triggering the synchronization of the files:
|
||||||
|
```bash
|
||||||
|
./sync.sh sync
|
||||||
|
```
|
||||||
|
Removing and cleaning up the files and the docker-sync container. Use only if you want to rebuild or remove docker-sync completely. The files on the host will be kept untouched.
|
||||||
|
```bash
|
||||||
|
./sync.sh clean
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
##### Additional Notes
|
||||||
|
|
||||||
|
- You may run laradock with or without docker-sync at any time using with the same `.env` and `docker-compose.yml`, because the configuration is overridden automatically when docker-sync is used.
|
||||||
|
- You may inspect the `sync.sh` script to learn each of the commands and even add custom ones.
|
||||||
|
- If a container cannot access the files on docker-sync, you may need to set a user on the Dockerfile of that container with an id of 1000 (this is the UID that nginx and php-fpm have configured on laradock). Alternatively, you may change the permissions to 777, but this is **not** recommended.
|
||||||
|
|
||||||
|
Visit the [docker-sync documentation](https://github.com/EugenMayer/docker-sync/wiki) for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
#### B.2: using the d4m-nfs tool
|
||||||
|
|
||||||
[D4m-nfs](https://github.com/IFSight/d4m-nfs) automatically mount NFS volume instead of osxfs one.
|
[D4m-nfs](https://github.com/IFSight/d4m-nfs) automatically mount NFS volume instead of osxfs one.
|
||||||
|
|
||||||
1) Update the Docker [File Sharing] preferences:
|
1) Update the Docker [File Sharing] preferences:
|
||||||
@ -1556,17 +1572,10 @@ docker-compose up ...
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Other good workarounds:
|
|
||||||
|
|
||||||
- [docker-sync](https://github.com/EugenMayer/docker-sync)
|
|
||||||
- Add more here..
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
More details about this issue [here](https://github.com/docker/for-mac/issues/77).
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ weight: 4
|
|||||||
|
|
||||||
* [Production Setup on Digital Ocean](#Digital-Ocean)
|
* [Production Setup on Digital Ocean](#Digital-Ocean)
|
||||||
* [PHPStorm XDebug Setup](#PHPStorm-Debugging)
|
* [PHPStorm XDebug Setup](#PHPStorm-Debugging)
|
||||||
|
* [Running Laravel Dusk Test](#Laravel-Dusk)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -555,4 +556,149 @@ Assuming that you are in laradock folder, type:
|
|||||||
- 
|
- 
|
||||||
- 
|
- 
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<a name="Laravel-Dusk"></a>
|
||||||
|
# Running Laravel Dusk Tests
|
||||||
|
|
||||||
|
- [Intro](#dusk-intro)
|
||||||
|
- [DNS Setup](#dns-setup)
|
||||||
|
- [Docker Compose Setup](#docker-compose)
|
||||||
|
- [Laravel Dusk Setup](#laravel-dusk-setup)
|
||||||
|
- [Running Laravel Dusk Tests](#running-tests)
|
||||||
|
|
||||||
|
<a name="dusk-intro"></a>
|
||||||
|
## Intro
|
||||||
|
Setting up Laravel Dusk tests to run with Laradock appears be something that
|
||||||
|
eludes most Laradock users. This guide is designed to show you how to wire them
|
||||||
|
up to work together. This guide is written with macOS and Linux in mind. As such,
|
||||||
|
it's only been tested on macOS. Feel free to create pull requests to update the guide
|
||||||
|
for Windows-specific instructions.
|
||||||
|
|
||||||
|
This guide assumes you know how to use a DNS forwarder such as `dnsmasq` or are comfortable
|
||||||
|
with editing the `/etc/hosts` file for one-off DNS changes.
|
||||||
|
|
||||||
|
<a name="dns-setup"></a>
|
||||||
|
## DNS Setup
|
||||||
|
According to RFC-2606, only four TLDs are reserved for local testing[^1]:
|
||||||
|
|
||||||
|
- `.test`
|
||||||
|
- `.example`
|
||||||
|
- `.invalid`
|
||||||
|
- `.localhost`
|
||||||
|
|
||||||
|
A common TLD used for local development is `.dev`, but newer versions of Google
|
||||||
|
Chrome (such as the one bundled with the Selenium Docker image), will fail to
|
||||||
|
resolve that DNS as there will appear to be a name collision.
|
||||||
|
|
||||||
|
The recommended extension is `.test` for your Laravel web apps because you're
|
||||||
|
running tests. Using a DNS forwarder such as `dnsmasq` or by editing the `/etc/hosts`
|
||||||
|
file, configure the host to point to `localhost`.
|
||||||
|
|
||||||
|
For example, in your `/etc/hosts` file:
|
||||||
|
```
|
||||||
|
##
|
||||||
|
# Host Database
|
||||||
|
#
|
||||||
|
# localhost is used to configure the loopback interface
|
||||||
|
# when the system is booting. Do not change this entry.
|
||||||
|
##
|
||||||
|
127.0.0.1 localhost
|
||||||
|
255.255.255.255 broadcasthost
|
||||||
|
::1 localhost
|
||||||
|
127.0.0.1 myapp.test
|
||||||
|
```
|
||||||
|
|
||||||
|
This will ensure that when navigating to `myapp.test`, it will route the
|
||||||
|
request to `127.0.0.1` which will be handled by Nginx in Laradock.
|
||||||
|
|
||||||
|
<a name="docker-compose"></a>
|
||||||
|
## Docker Compose setup
|
||||||
|
In order to make the Selenium container talk to the Nginx container appropriately,
|
||||||
|
the `docker-compose.yml` needs to be edited to accommodate this. Make the following
|
||||||
|
changes:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
...
|
||||||
|
selenium:
|
||||||
|
...
|
||||||
|
depends_on:
|
||||||
|
- nginx
|
||||||
|
links:
|
||||||
|
- nginx:<your_domain>
|
||||||
|
```
|
||||||
|
|
||||||
|
This allows network communication between the Nginx and Selenium containers
|
||||||
|
and it also ensures that when starting the Selenium container, the Nginx
|
||||||
|
container starts up first unless it's already running. This allows
|
||||||
|
the Selenium container to make requests to the Nginx container, which is
|
||||||
|
necessary for running Dusk tests. These changes also link the `nginx` environment
|
||||||
|
variable to the domain you wired up in your hosts file.
|
||||||
|
|
||||||
|
<a name="laravel-dusk-setup"></a>
|
||||||
|
## Laravel Dusk Setup
|
||||||
|
|
||||||
|
In order to make Laravel Dusk make the proper request to the Selenium container,
|
||||||
|
you have to edit the `DuskTestCase.php` file that's provided on the initial
|
||||||
|
installation of Laravel Dusk. The change you have to make deals with the URL the
|
||||||
|
Remote Web Driver attempts to use to set up the Selenium session.
|
||||||
|
|
||||||
|
One recommendation for this is to add a separate config option in your `.env.dusk.local`
|
||||||
|
so it's still possible to run your Dusk tests locally should you want to.
|
||||||
|
|
||||||
|
### .env.dusk.local
|
||||||
|
```
|
||||||
|
...
|
||||||
|
USE_SELENIUM=true
|
||||||
|
```
|
||||||
|
|
||||||
|
### DuskTestCase.php
|
||||||
|
```php
|
||||||
|
abstract class DuskTestCase extends BaseTestCase
|
||||||
|
{
|
||||||
|
...
|
||||||
|
protected function driver()
|
||||||
|
{
|
||||||
|
if (env('USE_SELENIUM', 'false') == 'true') {
|
||||||
|
return RemoteWebDriver::create(
|
||||||
|
'http://selenium:4444/wd/hub', DesiredCapabilities::chrome()
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return RemoteWebDriver::create(
|
||||||
|
'http://localhost:9515', DesiredCapabilities::chrome()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
<a name="running-tests"></a>
|
||||||
|
## Running Laravel Dusk Tests
|
||||||
|
|
||||||
|
Now that you have everything set up, to run your Dusk tests, you have to SSH
|
||||||
|
into the workspace container as you normally would:
|
||||||
|
```docker-compose exec --user=laradock workspace bash```
|
||||||
|
|
||||||
|
Once inside, you can change directory to your application and run:
|
||||||
|
|
||||||
|
```php artisan dusk```
|
||||||
|
|
||||||
|
One way to make this easier from your project is to create a helper script. Here's one such example:
|
||||||
|
```bash
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
LARADOCK_HOME="path/to/laradock"
|
||||||
|
|
||||||
|
pushd ${LARADOCK_HOME}
|
||||||
|
|
||||||
|
docker-compose exec --user=laradock workspace bash -c "cd my-project && php artisan dusk && exit"
|
||||||
|
```
|
||||||
|
|
||||||
|
This invokes the Dusk command from inside the workspace container but when the script completes
|
||||||
|
execution, it returns your session to your project directory.
|
||||||
|
|
||||||
|
[^1]: [Don't Use .dev for Development](https://iyware.com/dont-use-dev-for-development/)
|
||||||
|
@ -23,6 +23,7 @@ services:
|
|||||||
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
|
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
|
||||||
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
|
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
|
||||||
- INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
|
- INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
|
||||||
|
- INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE}
|
||||||
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
|
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
|
||||||
- INSTALL_V8JS=${WORKSPACE_INSTALL_V8JS}
|
- INSTALL_V8JS=${WORKSPACE_INSTALL_V8JS}
|
||||||
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
|
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
|
||||||
@ -100,6 +101,7 @@ services:
|
|||||||
php-worker:
|
php-worker:
|
||||||
build:
|
build:
|
||||||
context: ./php-worker
|
context: ./php-worker
|
||||||
|
dockerfile: "Dockerfile-${PHP_VERSION}"
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- applications
|
- applications
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -211,6 +213,7 @@ services:
|
|||||||
- ${MYSQL_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
|
- ${MYSQL_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
|
||||||
ports:
|
ports:
|
||||||
- "${MYSQL_PORT}:3306"
|
- "${MYSQL_PORT}:3306"
|
||||||
|
user: "1000:50"
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
@ -338,7 +341,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ${DATA_SAVE_PATH}/redis:/data
|
- ${DATA_SAVE_PATH}/redis:/data
|
||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "${REDIS_PORT}:6379"
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
@ -468,12 +471,15 @@ services:
|
|||||||
build: ./pgadmin
|
build: ./pgadmin
|
||||||
ports:
|
ports:
|
||||||
- "5050:5050"
|
- "5050:5050"
|
||||||
|
volumes:
|
||||||
|
- ${DATA_SAVE_PATH}/pgadmin-backup:/var/lib/pgadmin4/data/storage/pgadmin4
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
networks:
|
networks:
|
||||||
- frontend
|
- frontend
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
|
|
||||||
### ElasticSearch Container #################################
|
### ElasticSearch Container #################################
|
||||||
|
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
|
@ -36,6 +36,7 @@ WORKSPACE_INSTALL_MSSQL=false
|
|||||||
WORKSPACE_INSTALL_NODE=false
|
WORKSPACE_INSTALL_NODE=false
|
||||||
WORKSPACE_INSTALL_YARN=false
|
WORKSPACE_INSTALL_YARN=false
|
||||||
WORKSPACE_INSTALL_DRUSH=false
|
WORKSPACE_INSTALL_DRUSH=false
|
||||||
|
WORKSPACE_INSTALL_DRUPAL_CONSOLE=false
|
||||||
WORKSPACE_INSTALL_AEROSPIKE=false
|
WORKSPACE_INSTALL_AEROSPIKE=false
|
||||||
WORKSPACE_INSTALL_V8JS=false
|
WORKSPACE_INSTALL_V8JS=false
|
||||||
WORKSPACE_COMPOSER_GLOBAL_INSTALL=false
|
WORKSPACE_COMPOSER_GLOBAL_INSTALL=false
|
||||||
@ -104,6 +105,10 @@ MYSQL_PORT=3306
|
|||||||
MYSQL_ROOT_PASSWORD=root
|
MYSQL_ROOT_PASSWORD=root
|
||||||
MYSQL_ENTRYPOINT_INITDB=./mysql/docker-entrypoint-initdb.d
|
MYSQL_ENTRYPOINT_INITDB=./mysql/docker-entrypoint-initdb.d
|
||||||
|
|
||||||
|
### REDIS ##############################################################################################################
|
||||||
|
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
### Percona ############################################################################################################
|
### Percona ############################################################################################################
|
||||||
|
|
||||||
PERCONA_DATABASE=homestead
|
PERCONA_DATABASE=homestead
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
FROM chorss/docker-pgadmin4
|
FROM fenglc/pgadmin4
|
||||||
|
|
||||||
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
|
MAINTAINER Huadong Zuo <admin@zuohuadong.cn>
|
||||||
|
|
||||||
|
# user: pgadmin4@pgadmin.org
|
||||||
|
# password: admin
|
||||||
|
# pg_dump in "/usr/bin"
|
||||||
|
# backup in "/var/lib/pgadmin4/data/storage/pgadmin4/"
|
||||||
|
|
||||||
EXPOSE 5050
|
EXPOSE 5050
|
||||||
|
@ -3,14 +3,30 @@
|
|||||||
# Image Setup
|
# Image Setup
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# To take a look at the'php-worker' base Image, visit its DockerHub page
|
|
||||||
# https://hub.docker.com/r/nielsvdoorn/laravel-supervisor/
|
|
||||||
#
|
|
||||||
|
|
||||||
FROM nielsvdoorn/laravel-supervisor
|
FROM php:7.0-alpine
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
RUN apk --update add wget \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
build-base \
|
||||||
|
libmemcached-dev \
|
||||||
|
libmcrypt-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
zlib-dev \
|
||||||
|
autoconf \
|
||||||
|
cyrus-sasl-dev \
|
||||||
|
libgsasl-dev \
|
||||||
|
supervisor
|
||||||
|
|
||||||
|
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql mcrypt tokenizer xml
|
||||||
|
RUN pecl channel-update pecl.php.net && pecl install memcached && docker-php-ext-enable memcached
|
||||||
|
|
||||||
|
RUN rm /var/cache/apk/* \
|
||||||
|
&& mkdir -p /var/www
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Optional Supervisord Configuration
|
# Optional Supervisord Configuration
|
||||||
@ -19,7 +35,10 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
|||||||
# Modify the ./supervisor.conf file to match your App's requirements.
|
# Modify the ./supervisor.conf file to match your App's requirements.
|
||||||
# Make sure you rebuild your container with every change.
|
# Make sure you rebuild your container with every change.
|
||||||
#
|
#
|
||||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
||||||
|
COPY supervisord.conf /etc/supervisord.conf
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
59
php-worker/Dockerfile-71
Normal file
59
php-worker/Dockerfile-71
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Image Setup
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM php:7.1-alpine
|
||||||
|
|
||||||
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
RUN apk --update add wget \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
build-base \
|
||||||
|
libmemcached-dev \
|
||||||
|
libmcrypt-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
zlib-dev \
|
||||||
|
autoconf \
|
||||||
|
cyrus-sasl-dev \
|
||||||
|
libgsasl-dev \
|
||||||
|
supervisor
|
||||||
|
|
||||||
|
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql mcrypt tokenizer xml
|
||||||
|
RUN pecl channel-update pecl.php.net && pecl install memcached && docker-php-ext-enable memcached
|
||||||
|
|
||||||
|
RUN rm /var/cache/apk/* \
|
||||||
|
&& mkdir -p /var/www
|
||||||
|
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Optional Supervisord Configuration
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Modify the ./supervisor.conf file to match your App's requirements.
|
||||||
|
# Make sure you rebuild your container with every change.
|
||||||
|
#
|
||||||
|
|
||||||
|
COPY supervisord.conf /etc/supervisord.conf
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
|
||||||
|
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Optional Software's Installation
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# If you need to modify this image, feel free to do it right here.
|
||||||
|
#
|
||||||
|
# -- Your awesome modifications go here -- #
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Final Touch
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
|
||||||
|
WORKDIR /etc/supervisor/conf.d/
|
@ -210,6 +210,20 @@ RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
|||||||
drush core-status \
|
drush core-status \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Drupal Console:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_DRUPAL_CONSOLE=false
|
||||||
|
ENV INSTALL_DRUPAL_CONSOLE ${INSTALL_DRUPAL_CONSOLE}
|
||||||
|
RUN if [ ${INSTALL_DRUPAL_CONSOLE} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install mysql-client && \
|
||||||
|
curl https://drupalconsole.com/installer -L -o drupal.phar && \
|
||||||
|
mv drupal.phar /usr/local/bin/drupal && \
|
||||||
|
chmod +x /usr/local/bin/drupal \
|
||||||
|
;fi
|
||||||
|
|
||||||
USER laradock
|
USER laradock
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -210,6 +210,20 @@ RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
|||||||
drush core-status \
|
drush core-status \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Drupal Console:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_DRUPAL_CONSOLE=false
|
||||||
|
ENV INSTALL_DRUPAL_CONSOLE ${INSTALL_DRUPAL_CONSOLE}
|
||||||
|
RUN if [ ${INSTALL_DRUPAL_CONSOLE} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install mysql-client && \
|
||||||
|
curl https://drupalconsole.com/installer -L -o drupal.phar && \
|
||||||
|
mv drupal.phar /usr/local/bin/drupal && \
|
||||||
|
chmod +x /usr/local/bin/drupal \
|
||||||
|
;fi
|
||||||
|
|
||||||
USER laradock
|
USER laradock
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -207,6 +207,20 @@ RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
|||||||
drush core-status \
|
drush core-status \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Drupal Console:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_DRUPAL_CONSOLE=false
|
||||||
|
ENV INSTALL_DRUPAL_CONSOLE ${INSTALL_DRUPAL_CONSOLE}
|
||||||
|
RUN if [ ${INSTALL_DRUPAL_CONSOLE} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install mysql-client && \
|
||||||
|
curl https://drupalconsole.com/installer -L -o drupal.phar && \
|
||||||
|
mv drupal.phar /usr/local/bin/drupal && \
|
||||||
|
chmod +x /usr/local/bin/drupal \
|
||||||
|
;fi
|
||||||
|
|
||||||
USER laradock
|
USER laradock
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
Reference in New Issue
Block a user