Compare commits
164 Commits
Author | SHA1 | Date | |
---|---|---|---|
35183eff42 | |||
c5ccc2f4ff | |||
34ef36cd7e | |||
7138d7a13c | |||
c7695ca175 | |||
6f3c41b84d | |||
46852bc31b | |||
5a21337cc5 | |||
e2091cd309 | |||
1ead8aa060 | |||
7e393efbb6 | |||
beecbe758b | |||
1b1f6b7048 | |||
5835d185f2 | |||
4fc85d499d | |||
23ee4f6679 | |||
4e486280f4 | |||
9e807e39ee | |||
894b0197e0 | |||
c2c30bfd0f | |||
152c896515 | |||
4682aff622 | |||
a31114955a | |||
f4ede08b9c | |||
eac717fb21 | |||
c05c675408 | |||
60998ed1e4 | |||
05879bdda2 | |||
70a7bdca19 | |||
a71d5a8548 | |||
9fa3733622 | |||
b8e657b68f | |||
8aaa074af2 | |||
3005dde240 | |||
b3922995e1 | |||
49e48edefd | |||
182386b514 | |||
bea122a1fd | |||
7fb00658cf | |||
ee03bb607f | |||
9abd7c30f2 | |||
6a4509c0ca | |||
7f5d9d07d1 | |||
a5c505bf28 | |||
427088e11b | |||
3467821c28 | |||
f9553dff4c | |||
8e556008d8 | |||
17ea7b313f | |||
dff0e82ddb | |||
1702a5cc09 | |||
f15bc8e6b7 | |||
903c77421c | |||
2bedfdd9d7 | |||
525c4313a0 | |||
01c358b6bc | |||
a0685705c0 | |||
98b2b2e47b | |||
eeee14338f | |||
a2edf57e3b | |||
881cbfb8c2 | |||
508e9ebd9e | |||
6cff904eba | |||
04770bc4ec | |||
1281490c39 | |||
3f7988060e | |||
615cb72eab | |||
e036e69da2 | |||
8989c73711 | |||
61144ab2d9 | |||
221edf4bb2 | |||
ca9c07eb76 | |||
8f7b1b7e9f | |||
3cc917c9de | |||
5a073ae841 | |||
8c1e71eca5 | |||
c0e823b8d2 | |||
8cb4c8d62e | |||
f765afd4c2 | |||
6ea49a0683 | |||
998aa1365e | |||
f2420ec52c | |||
fe254e86e3 | |||
53b7f75500 | |||
4150f0b140 | |||
d340b6e60f | |||
e7357eab83 | |||
110aa91c59 | |||
e5aef41dd2 | |||
ae048e6c66 | |||
a5f3a92eb4 | |||
655b9a1526 | |||
7ac37ecd35 | |||
792789e479 | |||
801ccd47d2 | |||
5c5f94600a | |||
b2e372054f | |||
0a23d53ee5 | |||
f6552aca97 | |||
e9806d9bca | |||
e56801846b | |||
f9e6acd4e1 | |||
b61ff4f484 | |||
8485add87a | |||
d3fb967f0f | |||
a36620c3bd | |||
cddc934e1e | |||
53b3ad0f7e | |||
fdcf9117ac | |||
f800a3221a | |||
a1d3eeb7e6 | |||
b2f7348552 | |||
ebeddcba23 | |||
dba37307b5 | |||
2af5b2ff49 | |||
93d5b318fe | |||
9ce470e14e | |||
38fb49bccc | |||
08896f9fb6 | |||
dcab211b07 | |||
76001daf71 | |||
30b626d43e | |||
586a225c11 | |||
c099a51d52 | |||
245ddf3441 | |||
0192346cf2 | |||
e4f4de47e7 | |||
69ccd74d2e | |||
a3c66fdecf | |||
9b8eee6a98 | |||
668acd66c1 | |||
b25215684b | |||
8e84fbbec2 | |||
1e650d8643 | |||
4977b0f92f | |||
2082659fb1 | |||
1fe2df73e4 | |||
05c7f9186a | |||
3801973b15 | |||
6d89424e91 | |||
b1c1e6e187 | |||
972bdd90a3 | |||
2af40b0ba1 | |||
5c0b8316b1 | |||
004e4354aa | |||
d99cf73bf0 | |||
a365425c73 | |||
c836500488 | |||
318ca3f81c | |||
82219ededb | |||
d6ff224b0d | |||
b1144bba7e | |||
a590ed78ce | |||
f852789720 | |||
bf691337f1 | |||
eefd04dbfc | |||
a657dce572 | |||
d616545268 | |||
57ecd6e515 | |||
5b5ba53112 | |||
bd87a26db1 | |||
c0283da6ee | |||
e372d624a6 | |||
db6c6e7e0f |
63
.github/README.md
vendored
63
.github/README.md
vendored
@ -1,21 +1,43 @@
|
||||

|
||||
<p align="center">
|
||||
<img src="https://s19.postimg.org/jblfytw9f/laradock-logo.jpg" alt="Laradock Logo"/>
|
||||
</p>
|
||||
|
||||
[](https://travis-ci.org/laradock/laradock) [](https://github.com/laradock/laradock/issues) [](https://github.com/laradock/laradock/network) [](https://github.com/laradock/laradock/stargazers) [](https://raw.githubusercontent.com/laradock/laradock/master/LICENSE)
|
||||
<p align="center">A Docker PHP development environment that facilitates running PHP Apps on Docker</p>
|
||||
|
||||
> Use Docker first and learn about it later.
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/laradock/laradock"><img src="https://travis-ci.org/laradock/laradock.svg?branch=master" alt="Build status"></a>
|
||||
<a href="https://github.com/laradock/laradock/stargazers"><img src="https://img.shields.io/github/stars/laradock/laradock.svg" alt="GitHub stars"></a>
|
||||
<a href="https://github.com/laradock/laradock/network"><img src="https://img.shields.io/github/forks/laradock/laradock.svg" alt="GitHub forks"></a>
|
||||
<a href="https://github.com/laradock/laradock/issues"><img src="https://img.shields.io/github/issues/laradock/laradock.svg" alt="GitHub issues"></a>
|
||||
<a href="https://raw.githubusercontent.com/laradock/laradock/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="GitHub license"></a>
|
||||
<a href="http://laradock.io/contributing"><img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="contributions welcome"></a>
|
||||
</p>
|
||||
|
||||
A Docker PHP development environment that facilitates running **PHP** Apps on **Docker**.
|
||||
<h4 align="center" style="color:#7d58c2">Use Docker First And Learn About It Later</h4>
|
||||
|
||||
[](http://zalt.me)
|
||||
<p align="center">
|
||||
<a href="https://zalt.me"><img src="http://forthebadge.com/images/badges/built-by-developers.svg" alt="forthebadge" width="240" ></a>
|
||||
</p>
|
||||
|
||||
## Documentation
|
||||
|
||||
[**Full Documentation Here**](http://laradock.io)
|
||||
---
|
||||
|
||||
## Credits
|
||||
<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>
|
||||
|
||||
**Maintainers:**
|
||||
|
||||
## Sponsors
|
||||
|
||||
<a target='_blank' rel='nofollow' href='https://app.codesponsor.io/link/JHiroABWV9N5QKgcFuTA2NxX/laradock/laradock'>
|
||||
<img alt='Sponsor' width='888' height='68' src='https://app.codesponsor.io/embed/JHiroABWV9N5QKgcFuTA2NxX/laradock/laradock.svg' />
|
||||
</a>
|
||||
|
||||
## Contributors
|
||||
|
||||
#### Core contributors:
|
||||
- [Mahmoud Zalt](https://github.com/Mahmoudz) @mahmoudz | [Twitter](https://twitter.com/Mahmoud_Zalt) | [Site](http://zalt.me)
|
||||
- [Bo-Yi Wu](https://github.com/appleboy) @appleboy | [Twitter](https://twitter.com/appleboy)
|
||||
- [Philippe Trépanier](https://github.com/philtrep) @philtrep
|
||||
@ -27,8 +49,27 @@ A Docker PHP development environment that facilitates running **PHP** Apps on **
|
||||
- [Yu-Lung Shao (Allen)](https://github.com/bestlong) @bestlong
|
||||
- [Milan Urukalo](https://github.com/urukalo) @urukalo
|
||||
- [Vince Chu](https://github.com/vwchu) @vwchu
|
||||
- Join Us.
|
||||
- [Huadong Zuo](https://github.com/zuohuadong) @zuohuadong
|
||||
- Join us, by submitting 20 useful PR's.
|
||||
|
||||
#### Awesome contributors:
|
||||
- See full list [here](https://github.com/apiato/apiato/graphs/contributors).
|
||||
|
||||
|
||||
## Donations
|
||||
|
||||
> Help keeping the project development going, by [contributing](http://laradock.io/contributing) or donating a little.
|
||||
> Thanks in advance.
|
||||
|
||||
Donate directly via [Paypal](https://www.paypal.me/mzalt)
|
||||
|
||||
[](https://www.paypal.me/mzalt)
|
||||
|
||||
or show your support via [Beerpay](https://beerpay.io/laradock/laradock)
|
||||
|
||||
[](https://beerpay.io/laradock/laradock)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](https://github.com/laradock/laradock/blob/master/LICENSE) (MIT)
|
||||
[MIT License](https://github.com/laradock/laradock/blob/master/LICENSE)
|
||||
|
12
.travis.yml
12
.travis.yml
@ -4,7 +4,9 @@ services:
|
||||
- docker
|
||||
|
||||
env:
|
||||
matrix:
|
||||
matrix:
|
||||
- HUGO_VERSION=0.20.2
|
||||
|
||||
- PHP_VERSION=56 BUILD_SERVICE="applications blackfire minio percona nginx caddy apache2 mysql mariadb phpmyadmin postgres postgres-postgis pgadmin neo4j mongo redis"
|
||||
- PHP_VERSION=70 BUILD_SERVICE="applications blackfire minio percona nginx caddy apache2 mysql mariadb phpmyadmin postgres postgres-postgis pgadmin neo4j mongo redis"
|
||||
- PHP_VERSION=71 BUILD_SERVICE="applications blackfire minio percona nginx caddy apache2 mysql mariadb phpmyadmin postgres postgres-postgis pgadmin neo4j mongo redis"
|
||||
@ -33,11 +35,9 @@ env:
|
||||
- PHP_VERSION=70 BUILD_SERVICE=aerospike
|
||||
- PHP_VERSION=71 BUILD_SERVICE=aerospike
|
||||
|
||||
- PHP_VERSION=56 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer"
|
||||
- PHP_VERSION=70 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer"
|
||||
- PHP_VERSION=71 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer"
|
||||
|
||||
- HUGO_VERSION=0.20.2
|
||||
- PHP_VERSION=56 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 balancer"
|
||||
- PHP_VERSION=70 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 balancer"
|
||||
- PHP_VERSION=71 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 balancer"
|
||||
|
||||
# Installing a newer Docker version
|
||||
before_install:
|
||||
|
@ -13,8 +13,8 @@ If you have questions about how to use Laradock, please direct your questions to
|
||||
|
||||
## Found an Issue
|
||||
|
||||
If have an issue or you found a typo in the documentation, you can help us by
|
||||
opnening an [Issue](https://github.com/laradock/laradock/issues).
|
||||
If you have an issue or you found a typo in the documentation, you can help us by
|
||||
opening an [Issue](https://github.com/laradock/laradock/issues).
|
||||
|
||||
**Steps to do before opening an Issue:**
|
||||
|
||||
@ -24,7 +24,7 @@ opnening an [Issue](https://github.com/laradock/laradock/issues).
|
||||
|
||||
If your issue appears to be a bug, and hasn't been reported, then open a new issue.
|
||||
|
||||
*This Help us to maximize the effort we can spend fixing issues and adding new
|
||||
*This helps us maximize the effort we can spend fixing issues and adding new
|
||||
features, by not reporting duplicate issues.*
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ To update the sidebar or add a new section to it, you can edit this `DOCUMENTATI
|
||||
|
||||
## Support new Software (Add new Container)
|
||||
|
||||
* Forke the repo and clone the code.
|
||||
* Fork the repo and clone the code.
|
||||
|
||||
* Create folder as the software name (example: `mysql` - `nginx`).
|
||||
|
||||
@ -81,7 +81,7 @@ To update the sidebar or add a new section to it, you can edit this `DOCUMENTATI
|
||||
|
||||
## Edit supported Software (Edit a Container)
|
||||
|
||||
* Forke the repo and clone the code.
|
||||
* Fork the repo and clone the code.
|
||||
|
||||
* Open the software (container) folder (example: `mysql` - `nginx`).
|
||||
|
||||
|
@ -5,6 +5,8 @@ weight: 3
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="List-current-running-Containers"></a>
|
||||
## List current running Containers
|
||||
```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>
|
||||
<a name="Add-Docker-Images"></a>
|
||||
|
||||
## 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/).
|
||||
@ -310,7 +232,7 @@ By default **PHP-FPM 7.0** is running.
|
||||
php-fpm:
|
||||
build:
|
||||
context: ./php-fpm
|
||||
dockerfile: Dockerfile-70
|
||||
dockerfile: Dockerfile-56
|
||||
...
|
||||
```
|
||||
|
||||
@ -409,7 +331,7 @@ For information on how to configure xDebug with your IDE and work it out, check
|
||||
<a name="Setup remote debugging for PhpStorm on Linux"></a>
|
||||
## Setup remote debugging for PhpStorm on Linux
|
||||
|
||||
- Make sure you have followed the steps above in the [Install Xdebug section](http://laradock.io/documentation/#install-xdebug).
|
||||
- Make sure you have followed the steps above in the [Install Xdebug section](http://laradock.io/documentation/#install-xdebug).
|
||||
|
||||
- Make sure Xdebug accepts connections and listens on port 9000. (Should be default configuration).
|
||||
|
||||
@ -619,11 +541,18 @@ b) add a new service container by simply copy-paste this section below PHP-FPM c
|
||||
```yaml
|
||||
php-worker:
|
||||
build:
|
||||
context: ./php-fpm
|
||||
dockerfile: Dockerfile-70 # or Dockerfile-56, choose your PHP-FPM container setting
|
||||
context: ./php-worker
|
||||
dockerfile: "Dockerfile-${PHP_VERSION}" #Dockerfile-71 or #Dockerfile-70 available
|
||||
args:
|
||||
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL} #Optionally install PGSQL PHP drivers
|
||||
volumes_from:
|
||||
- applications
|
||||
command: php artisan queue:work
|
||||
depends_on:
|
||||
- workspace
|
||||
extra_hosts:
|
||||
- "dockerhost:${DOCKER_HOST_IP}"
|
||||
networks:
|
||||
- backend
|
||||
```
|
||||
2 - Start everything up
|
||||
|
||||
@ -645,13 +574,15 @@ docker-compose up -d php-worker
|
||||
docker-compose up -d redis
|
||||
```
|
||||
|
||||
> To execute redis commands, enter the redis container first `docker-compose exec redis bash` then enter the `redis-cli`.
|
||||
|
||||
2 - Open your Laravel's `.env` file and set the `REDIS_HOST` to `redis`
|
||||
|
||||
```env
|
||||
REDIS_HOST=redis
|
||||
```
|
||||
|
||||
If you don't find the `REDIS_HOST` variable in your `.env` file. Go to the database configuration file `config/database.php` and replace the default `127.0.0.1` IP with `redis` for Redis like this:
|
||||
If you're using Laravel, and you don't find the `REDIS_HOST` variable in your `.env` file. Go to the database configuration file `config/database.php` and replace the default `127.0.0.1` IP with `redis` for Redis like this:
|
||||
|
||||
```php
|
||||
'redis' => [
|
||||
@ -891,19 +822,20 @@ docker-compose up -d elasticsearch
|
||||
|
||||
2 - Open your browser and visit the localhost on port **9200**: `http://localhost:9200`
|
||||
|
||||
> The default username is `user` and the default password is `changeme`.
|
||||
|
||||
### Install ElasticSearch Plugin
|
||||
|
||||
1 - Install the ElasticSearch plugin like [delete-by-query](https://www.elastic.co/guide/en/elasticsearch/plugins/current/plugins-delete-by-query.html).
|
||||
1 - Install an ElasticSearch plugin.
|
||||
|
||||
```bash
|
||||
docker exec {container-name} /usr/share/elasticsearch/bin/plugin install delete-by-query
|
||||
docker-compose exec elasticsearch /usr/share/elasticsearch/bin/plugin install {plugin-name}
|
||||
```
|
||||
|
||||
2 - Restart elasticsearch container
|
||||
|
||||
```bash
|
||||
docker restart {container-name}
|
||||
docker-compose restart elasticsearch
|
||||
```
|
||||
|
||||
|
||||
@ -1000,6 +932,44 @@ docker-compose up -d minio
|
||||
```
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-AWS"></a>
|
||||
## Use AWS
|
||||
|
||||
1 - Configure AWS:
|
||||
- make sure to add your SSH keys in aws/ssh_keys folder
|
||||
|
||||
2 - Run the Aws Container (`aws`) with the `docker-compose up` command. Example:
|
||||
|
||||
```bash
|
||||
docker-compose up -d aws
|
||||
```
|
||||
|
||||
3 - Access the aws container with `docker-compose exec aws bash`
|
||||
|
||||
4 - To start using eb cli inside the container, initiaze your project first by doing 'eb init'. Read the [aws eb cli](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-configuration.html) docs for more details.
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-Grafana"></a>
|
||||
## Use Grafana
|
||||
|
||||
1 - Configure Grafana: Change Port using `GRAFANA_PORT` if you wish to. Default is port 3000.
|
||||
|
||||
2 - Run the Grafana Container (`grafana`) with the `docker-compose up`command:
|
||||
|
||||
```bash
|
||||
docker-compose up -d grafana
|
||||
```
|
||||
|
||||
3 - Open your browser and visit the localhost on port **3000** at the following URL: `http://localhost:3000`
|
||||
|
||||
4 - Login using the credentials User = `admin` Passwort = `admin`. Change the password in the webinterface if you want to.
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="CodeIgniter"></a>
|
||||
|
||||
@ -1021,9 +991,18 @@ To install CodeIgniter 3 on Laradock all you have to do is the following simple
|
||||
3 - Re-build your PHP-FPM Container `docker-compose build php-fpm`.
|
||||
|
||||
|
||||
<a name="Install-Symfony"></a>
|
||||
## Install Symfony
|
||||
|
||||
1 - Open the `.env` file and set `WORKSPACE_INSTALL_SYMFONY` to `true`.
|
||||
|
||||
2 - Run `docker-compose build workspace`, after the step above.
|
||||
|
||||
3 - The NGINX sites include a default config file for your Symfony project `symfony.conf.example`, so edit it and make sure the `root` is pointing to your project `web` directory.
|
||||
|
||||
4 - Run `docker-compose restart` if the container was already running, before the step above.
|
||||
|
||||
5 - Visit `symfony.dev`
|
||||
|
||||
<br>
|
||||
<a name="Misc"></a>
|
||||
@ -1485,7 +1464,11 @@ Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requ
|
||||
<a name="Speed-MacOS"></a>
|
||||
## 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
|
||||
|
||||
@ -1505,9 +1488,99 @@ Quick Setup giude, (we recommend you check their docs)
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Docker-Sync"></a>
|
||||
### 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.
|
||||
|
||||
1) Update the Docker [File Sharing] preferences:
|
||||
@ -1547,17 +1620,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).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1642,3 +1708,7 @@ This error sometimes happens because your Laravel application isn't running on t
|
||||
2. Change the `DB_HOST` variable on env with the IP that you received from previous step.
|
||||
* Option B
|
||||
1. Change the `DB_HOST` value to the same name as the MySQL docker container. The Laradock docker-compose file currently has this as `mysql`
|
||||
|
||||
## I get stuck when building nginx on `fetch http://mirrors.aliyun.com/alpine/v3.5/main/x86_64/APKINDEX.tar.gz`
|
||||
|
||||
As stated on [#749](https://github.com/laradock/laradock/issues/749#issuecomment-293296687), removing the line `RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories` from `nginx/Dockerfile` solves the problem.
|
||||
|
@ -112,9 +112,9 @@ Your folder structure should look like this:
|
||||
|
||||
2 - Go to `nginx/sites` and create config files to point to different project directory when visiting different domains.
|
||||
|
||||
Laradock by default includes `project-1.conf` and `project-2.conf` as working samples.
|
||||
Laradock by default includes `app.conf.example`, `laravel.conf.example` and `symfony.conf.example` as working samples.
|
||||
|
||||
3 - change the default names `project-n`:
|
||||
3 - change the default names `*.conf`:
|
||||
|
||||
You can rename the config files, project folders and domains as you like, just make sure the `root` in the config files, is pointing to the correct project folder name.
|
||||
|
||||
@ -123,6 +123,7 @@ You can rename the config files, project folders and domains as you like, just m
|
||||
```
|
||||
127.0.0.1 project-1.dev
|
||||
127.0.0.1 project-2.dev
|
||||
...
|
||||
```
|
||||
|
||||
> **Now jump to the [Usage](#Usage) section.**
|
||||
|
@ -8,6 +8,7 @@ weight: 4
|
||||
|
||||
* [Production Setup on Digital Ocean](#Digital-Ocean)
|
||||
* [PHPStorm XDebug Setup](#PHPStorm-Debugging)
|
||||
* [Running Laravel Dusk Test](#Laravel-Dusk)
|
||||
|
||||
|
||||
|
||||
@ -326,6 +327,7 @@ Set the following variables:
|
||||
- `laradock/php-fpm/xdebug.ini`
|
||||
|
||||
Set the following variables:
|
||||
|
||||
```
|
||||
xdebug.remote_autostart=1
|
||||
xdebug.remote_enable=1
|
||||
@ -336,34 +338,39 @@ xdebug.cli_color=1
|
||||
|
||||
<a name="InstallCleanHouse"></a>
|
||||
### Need to clean house first?
|
||||
|
||||
Make sure you are starting with a clean state. For example, do you have other Laradock containers and images?
|
||||
Here are a few things I use to clean things up.
|
||||
|
||||
- Delete all containers using `grep laradock_` on the names, see: [Remove all containers based on docker image name](https://linuxconfig.org/remove-all-containners-based-on-docker-image-name).
|
||||
|
||||
`docker ps -a | awk '{ print $1,$2 }' | grep laradock_ | awk '{print $1}' | xargs -I {} docker rm {}`
|
||||
|
||||
- Delete all images containing `laradock`.
|
||||
|
||||
`docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}`
|
||||
**Note:** This will only delete images that were built with `Laradock`, **NOT** `laradock/*` which are pulled down by `Laradock` such as `laradock/workspace`, etc.
|
||||
**Note:** Some may fail with:
|
||||
`Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images`
|
||||
|
||||
- I added this to my `.bashrc` to remove orphaned images.
|
||||
```
|
||||
dclean() {
|
||||
processes=`docker ps -q -f status=exited`
|
||||
if [ -n "$processes" ]; thend
|
||||
docker rm $processes
|
||||
fi
|
||||
|
||||
images=`docker images -q -f dangling=true`
|
||||
if [ -n "$images" ]; then
|
||||
docker rmi $images
|
||||
fi
|
||||
}
|
||||
```
|
||||
```
|
||||
dclean() {
|
||||
processes=`docker ps -q -f status=exited`
|
||||
if [ -n "$processes" ]; thend
|
||||
docker rm $processes
|
||||
fi
|
||||
|
||||
images=`docker images -q -f dangling=true`
|
||||
if [ -n "$images" ]; then
|
||||
docker rmi $images
|
||||
fi
|
||||
}
|
||||
```
|
||||
|
||||
- If you frequently switch configurations for Laradock, you may find that adding the following and added to your `.bashrc` or equivalent useful:
|
||||
|
||||
```
|
||||
# remove laravel* containers
|
||||
# remove laravel_* images
|
||||
@ -406,14 +413,14 @@ laradock_php-fpm_1 php-fpm Up 9000/tcp
|
||||
laradock_volumes_data_1 true Exit 0
|
||||
laradock_volumes_source_1 true Exit 0
|
||||
laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222->22/tcp
|
||||
|
||||
|
||||
```
|
||||
|
||||
<a name="enablePhpXdebug"></a>
|
||||
## Enable xDebug on php-fpm
|
||||
|
||||
In a host terminal sitting in the laradock folder, run: `.php-fpm/xdebug status`
|
||||
You should see something like the following:
|
||||
|
||||
```
|
||||
xDebug status
|
||||
laradock_php-fpm_1
|
||||
@ -422,6 +429,7 @@ Copyright (c) 1997-2016 The PHP Group
|
||||
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
|
||||
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
|
||||
```
|
||||
|
||||
Other commands include `.php-fpm/xdebug start | stop`.
|
||||
|
||||
If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will already be running when
|
||||
@ -430,6 +438,7 @@ If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will
|
||||
|
||||
<a name="InstallPHPStormConfigs"></a>
|
||||
## PHPStorm Settings
|
||||
|
||||
- Here are some settings that are known to work:
|
||||
- `Settings/BuildDeploymentConnection`
|
||||
- 
|
||||
@ -547,4 +556,330 @@ Assuming that you are in laradock folder, type:
|
||||
- 
|
||||
- 
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<a name="Laravel-Dusk"></a>
|
||||
# Running Laravel Dusk Tests
|
||||
|
||||
- [Option 1: Without Selenium](#option1-dusk)
|
||||
- [Option 2: With Selenium](#option2-dusk)
|
||||
|
||||
<a name="option1-dusk"></a>
|
||||
## Option 1: Without Selenium
|
||||
|
||||
- [Intro](#option1-dusk-intro)
|
||||
- [Workspace Setup](#option1-workspace-setup)
|
||||
- [Application Setup](#option1-application-setup)
|
||||
- [Choose Chrome Driver Version (Optional)](#option1-choose-chrome-driver-version)
|
||||
- [Run Dusk Tests](#option1-run-dusk-tests)
|
||||
|
||||
<a name="option1-dusk-intro"></a>
|
||||
### Intro
|
||||
|
||||
This is a guide to run Dusk tests in your `workspace` container with headless
|
||||
google-chrome and chromedriver. It has been tested with Laravel 5.4 and 5.5.
|
||||
|
||||
<a name="option1-workspace-setup"></a>
|
||||
### Workspace Setup
|
||||
|
||||
Update your .env with following entries:
|
||||
|
||||
```
|
||||
...
|
||||
# Install Laravel installer bin to setup demo app
|
||||
WORKSPACE_INSTALL_LARAVEL_INSTALLER=true
|
||||
...
|
||||
# Install all the necessary dependencies for running Dusk tests
|
||||
WORKSPACE_INSTALL_DUSK_DEPS=true
|
||||
...
|
||||
```
|
||||
|
||||
Then run below to build your workspace.
|
||||
|
||||
```
|
||||
docker-compose build workspace
|
||||
```
|
||||
|
||||
<a name="option1-application-setup"></a>
|
||||
### Application Setup
|
||||
|
||||
Run a `workspace` container and you will be inside the container at `/var/www` directory.
|
||||
|
||||
```
|
||||
docker-compose run workspace bash
|
||||
|
||||
/var/www#> _
|
||||
```
|
||||
|
||||
Create new Laravel application named `dusk-test` and install Laravel Dusk package.
|
||||
|
||||
```
|
||||
/var/www> laravel new dusk-test
|
||||
/var/www> cd dusk-test
|
||||
/var/www/dusk-test> composer require --dev laravel/dusk
|
||||
/var/www/dusk-test> php artisan dusk:install
|
||||
```
|
||||
|
||||
Create `.env.dusk.local` by copying from `.env` file.
|
||||
|
||||
```
|
||||
/var/www/dusk-test> cp .env .env.dusk.local
|
||||
```
|
||||
|
||||
Update the `APP_URL` entry in `.env.dusk.local` to local Laravel server.
|
||||
|
||||
```
|
||||
APP_URL=http://localhost:8000
|
||||
```
|
||||
|
||||
You will need to run chromedriver with `headless` and `no-sandbox` flag. In Laravel Dusk 2.x it is
|
||||
already set `headless` so you just need to add `no-sandbox` flag. If you on previous version 1.x,
|
||||
you will need to update your `DustTestCase#driver` as shown below.
|
||||
|
||||
|
||||
```
|
||||
<?php
|
||||
|
||||
...
|
||||
|
||||
abstract class DuskTestCase extends BaseTestCase
|
||||
{
|
||||
...
|
||||
|
||||
/**
|
||||
* Update chrome driver with below flags
|
||||
*/
|
||||
protected function driver()
|
||||
{
|
||||
$options = (new ChromeOptions)->addArguments([
|
||||
'--disable-gpu',
|
||||
'--headless',
|
||||
'--no-sandbox'
|
||||
]);
|
||||
|
||||
return RemoteWebDriver::create(
|
||||
'http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
|
||||
ChromeOptions::CAPABILITY, $options
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<a name="option1-choose-chrome-driver-version"></a>
|
||||
### Choose Chrome Driver Version (Optional)
|
||||
|
||||
You could choose to use either:
|
||||
|
||||
1. Chrome Driver shipped with Laravel Dusk. (Default)
|
||||
2. Chrome Driver installed in `workspace` container. (Required tweak on DuskTestCase class)
|
||||
|
||||
For Laravel 2.x, you need to update `DuskTestCase#prepare` method if you wish to go with option #2.
|
||||
|
||||
```
|
||||
|
||||
<?php
|
||||
|
||||
...
|
||||
abstract class DuskTestCase extends BaseTestCase
|
||||
{
|
||||
...
|
||||
public static function prepare()
|
||||
{
|
||||
// Only add this line if you wish to use chrome driver installed in workspace container.
|
||||
// You might want to read the file path from env file.
|
||||
static::useChromedriver('/usr/local/bin/chromedriver');
|
||||
|
||||
static::startChromeDriver();
|
||||
}
|
||||
```
|
||||
|
||||
For Laravel 1.x, you need to add `DuskTestCase#buildChromeProcess` method if you wish to go with option #2.
|
||||
|
||||
```
|
||||
<?php
|
||||
|
||||
...
|
||||
use Symfony\Component\Process\ProcessBuilder;
|
||||
|
||||
abstract class DuskTestCase extends BaseTestCase
|
||||
{
|
||||
...
|
||||
|
||||
/**
|
||||
* Only add this method if you wish to use chrome driver installed in workspace container
|
||||
*/
|
||||
protected static function buildChromeProcess()
|
||||
{
|
||||
return (new ProcessBuilder())
|
||||
->setPrefix('chromedriver')
|
||||
->getProcess()
|
||||
->setEnv(static::chromeEnvironment());
|
||||
}
|
||||
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
<a name="option1-run-dusk-tests"></a>
|
||||
### Run Dusk Tests
|
||||
|
||||
Run local server in `workspace` container and run Dusk tests.
|
||||
|
||||
```
|
||||
# alias to run Laravel server in the background (php artisan serve --quiet &)
|
||||
/var/www/dusk-test> serve
|
||||
# alias to run Dusk tests (php artisan dusk)
|
||||
/var/www/dusk-test> dusk
|
||||
|
||||
PHPUnit 6.4.0 by Sebastian Bergmann and contributors.
|
||||
|
||||
. 1 / 1 (100%)
|
||||
|
||||
Time: 837 ms, Memory: 6.00MB
|
||||
```
|
||||
|
||||
<a name="option2-dusk"></a>
|
||||
## Option 2: With Selenium
|
||||
|
||||
- [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/)
|
||||
|
@ -97,7 +97,7 @@ Beanstalkd - RabbitMQ - PHP Worker
|
||||
- **Queueing Management:**
|
||||
Beanstalkd Console - RabbitMQ Console
|
||||
- **Random Tools:**
|
||||
HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Mailhog - Minio - Varnish - Swoole - Laravel Echo...
|
||||
HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Grafana - Mailhog - MailDev - Minio - Varnish - Swoole - Laravel Echo...
|
||||
|
||||
Laradock introduces the **Workspace** Image, as a development environment.
|
||||
It contains a rich set of helpful tools, all pre-configured to work and integrate with almost any combination of Containers and tools you may choose.
|
||||
@ -116,6 +116,11 @@ If you can't find your Software in the list, build it yourself and submit it. Co
|
||||
|
||||
|
||||
|
||||
## Sponsors
|
||||
|
||||
<a target='_blank' rel='nofollow' href='https://app.codesponsor.io/link/JHiroABWV9N5QKgcFuTA2NxX/laradock/laradock'>
|
||||
<img alt='Sponsor' width='888' height='68' src='https://app.codesponsor.io/embed/JHiroABWV9N5QKgcFuTA2NxX/laradock/laradock.svg' />
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
@ -170,3 +175,21 @@ What's better than a **Demo Video**:
|
||||
You are welcome to join our chat room on Gitter.
|
||||
|
||||
[](https://gitter.im/Laradock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="Donations"></a>
|
||||
## Donations
|
||||
|
||||
> Help keeping the project development going, by [contributing](http://laradock.io/contributing) or donating a little.
|
||||
> Thanks in advance.
|
||||
|
||||
Donate directly via [Paypal](https://www.paypal.me/mzalt)
|
||||
|
||||
[](https://www.paypal.me/mzalt)
|
||||
|
||||
or show your support via [Beerpay](https://beerpay.io/laradock/laradock)
|
||||
|
||||
[](https://beerpay.io/laradock/laradock)
|
||||
|
@ -20,11 +20,25 @@
|
||||
<main class="main">
|
||||
<div class="drawer">
|
||||
{{ partial "drawer" . }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<article class="article">
|
||||
<div class="wrapper">
|
||||
<h1>{{ .Title }} {{ if .IsDraft }} (Draft){{ end }}</h1>
|
||||
|
||||
<!-- ------------------------------------------------------------------------- -->
|
||||
<!-- Google Ads -->
|
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<!-- Laradock Horizontal -->
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:890px;height:100px"
|
||||
data-ad-client="ca-pub-9826129398689742"
|
||||
data-ad-slot="2340256024"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
<!-- ------------------------------------------------------------------------- -->
|
||||
|
||||
<h1>{{ .Title }} {{ if .IsDraft }} (Draft){{ end }}</h1>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
|
@ -24,6 +24,20 @@
|
||||
|
||||
<article class="article">
|
||||
<div class="wrapper">
|
||||
|
||||
<!-- ------------------------------------------------------------------------- -->
|
||||
<!-- Google Ads -->
|
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<!-- Laradock Horizontal -->
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:890px;height:100px"
|
||||
data-ad-client="ca-pub-9826129398689742"
|
||||
data-ad-slot="2340256024"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
<!-- ------------------------------------------------------------------------- -->
|
||||
|
||||
{{ range where .Site.Pages "Type" "index" }}
|
||||
<h1>{{ .Title }} {{ if .IsDraft }} (Draft){{ end }}</h1>
|
||||
|
||||
|
@ -42,18 +42,39 @@
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
{{ if isset .Site.Params "author" }}
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<div>
|
||||
<!-- ------------------------------------------------------------------------- -->
|
||||
<!-- Google Ads -->
|
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<!-- Laradock Vertical -->
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:237px;height:600px"
|
||||
data-ad-client="ca-pub-9826129398689742"
|
||||
data-ad-slot="9891442983"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
<!-- ------------------------------------------------------------------------- -->
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<!--{{ if isset .Site.Params "author" }}-->
|
||||
<!--<hr>-->
|
||||
<!--<span class="section">The author</span>-->
|
||||
|
||||
<ul>
|
||||
{{ with .Site.Social.twitter }}
|
||||
<li>
|
||||
<a href="https://twitter.com/{{ . }}" target="_blank" title="@{{ . }} on Twitter">
|
||||
@{{ . }} on Twitter
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
<!---->
|
||||
<!--<ul>-->
|
||||
<!--{{ with .Site.Social.twitter }}-->
|
||||
<!--<li>-->
|
||||
<!--<a href="https://twitter.com/{{ . }}" target="_blank" title="@{{ . }} on Twitter">-->
|
||||
<!--@{{ . }} on Twitter-->
|
||||
<!--</a>-->
|
||||
<!--</li>-->
|
||||
<!--{{ end }}-->
|
||||
|
||||
<!--{{ with .Site.Social.github }}-->
|
||||
<!--<li>-->
|
||||
@ -63,16 +84,17 @@
|
||||
<!--</li>-->
|
||||
<!--{{ end }}-->
|
||||
|
||||
{{ with .Site.Social.email }}
|
||||
<li>
|
||||
<a href="mailto:{{ . }}" title="Email of {{ . }}">
|
||||
Contact via email
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
<!--{{ with .Site.Social.email }}-->
|
||||
<!--<li>-->
|
||||
<!--<a href="mailto:{{ . }}" title="Email of {{ . }}">-->
|
||||
<!--Contact via email-->
|
||||
<!--</a>-->
|
||||
<!--</li>-->
|
||||
<!--{{ end }}-->
|
||||
<!--</ul>-->
|
||||
<!--{{ end }}-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
@ -2,15 +2,19 @@ FROM webdevops/apache:ubuntu-16.04
|
||||
|
||||
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
|
||||
|
||||
ARG PHP_SOCKET=php-fpm:9000
|
||||
ARG PHP_UPSTREAM_CONTAINER=php-fpm
|
||||
ARG PHP_UPSTREAM_PORT=9000
|
||||
ARG PHP_UPSTREAM_TIMEOUT=60
|
||||
|
||||
ENV WEB_PHP_SOCKET=$PHP_SOCKET
|
||||
ENV WEB_PHP_SOCKET=${PHP_UPSTREAM_CONTAINER}:${PHP_UPSTREAM_PORT}
|
||||
|
||||
ENV WEB_DOCUMENT_ROOT=/var/www/public/
|
||||
ENV WEB_DOCUMENT_ROOT=/var/www/
|
||||
|
||||
ENV WEB_PHP_TIMEOUT=${PHP_UPSTREAM_TIMEOUT}
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
WORKDIR /var/www/public/
|
||||
WORKDIR /var/www/
|
||||
|
||||
COPY vhost.conf /etc/apache2/sites-enabled/vhost.conf
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName laradock.dev
|
||||
DocumentRoot /var/www/public/
|
||||
DocumentRoot /var/www/
|
||||
Options Indexes FollowSymLinks
|
||||
|
||||
<Directory "/var/www/public/">
|
||||
<Directory "/var/www/">
|
||||
AllowOverride All
|
||||
<IfVersion < 2.4>
|
||||
Allow from all
|
||||
|
1
aws/.gitignore
vendored
Normal file
1
aws/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
./ssh_keys
|
17
aws/Dockerfile
Normal file
17
aws/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM python:slim
|
||||
|
||||
MAINTAINER melchabcede@gmail.com
|
||||
|
||||
RUN pip install --upgrade --no-cache-dir awsebcli
|
||||
RUN apt-get -yqq update && apt-get -yqq install git-all
|
||||
|
||||
#NOTE: make sure ssh keys are added to ssh_keys folder
|
||||
|
||||
RUN mkdir root/tmp_ssh
|
||||
COPY /ssh_keys/. /root/.ssh/
|
||||
RUN cd /root/.ssh && chmod 600 * && chmod 644 *.pub
|
||||
|
||||
# Set default work directory
|
||||
WORKDIR /var/www
|
||||
|
||||
|
@ -1,28 +1,30 @@
|
||||
# Docs: https://caddyserver.com/docs/caddyfile
|
||||
0.0.0.0:80
|
||||
root /var/www/public
|
||||
fastcgi / php-fpm:9000 php {
|
||||
index index.php
|
||||
0.0.0.0:80 {
|
||||
root /var/www/public
|
||||
fastcgi / php-fpm:9000 php {
|
||||
index index.php
|
||||
}
|
||||
|
||||
# To handle .html extensions with laravel change ext to
|
||||
# ext / .html
|
||||
|
||||
rewrite {
|
||||
to {path} {path}/ /index.php?{query}
|
||||
}
|
||||
gzip
|
||||
browse
|
||||
log /var/log/caddy/access.log
|
||||
errors /var/log/caddy/error.log
|
||||
# Uncomment to enable TLS (HTTPS)
|
||||
# Change the first list to listen on port 443 when enabling TLS
|
||||
#tls self_signed
|
||||
|
||||
# To use Lets encrpt tls with a DNS provider uncomment these
|
||||
# lines and change the provider as required
|
||||
#tls {
|
||||
# dns cloudflare
|
||||
#}
|
||||
}
|
||||
|
||||
# To handle .html extensions with laravel change ext to
|
||||
# ext / .html
|
||||
|
||||
rewrite {
|
||||
r .*
|
||||
ext /
|
||||
to /index.php?{query}
|
||||
laradock.demo:80 {
|
||||
root /var/www/public
|
||||
}
|
||||
gzip
|
||||
browse
|
||||
log /var/log/caddy/access.log
|
||||
errors /var/log/caddy/error.log
|
||||
# Uncomment to enable TLS (HTTPS)
|
||||
# Change the first list to listen on port 443 when enabling TLS
|
||||
#tls self_signed
|
||||
|
||||
# To use Lets encrpt tls with a DNS provider uncomment these
|
||||
# lines and change the provider as required
|
||||
#tls {
|
||||
# dns cloudflare
|
||||
#}
|
||||
|
@ -1,22 +1,17 @@
|
||||
FROM alpine:3.4
|
||||
FROM golang
|
||||
|
||||
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
|
||||
MAINTAINER Huadong Zuo <admin@zuohuadong.cn>
|
||||
|
||||
ENV caddy_version=0.10.3
|
||||
ARG plugins=http.git
|
||||
ARG plugins="git"
|
||||
|
||||
LABEL caddy_version="$caddy_version" architecture="amd64"
|
||||
## If you come frome china, please ues it.
|
||||
|
||||
RUN apk update \
|
||||
&& apk upgrade \
|
||||
&& apk add tar curl git openssh
|
||||
# RUN echo "172.217.6.127 golang.org" >> /etc/hosts
|
||||
|
||||
RUN curl --silent --show-error --fail --location \
|
||||
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
|
||||
"https://caddyserver.com/download/linux/amd64?plugins=${plugins}" \
|
||||
| tar --no-same-owner -C /usr/bin/ -xz caddy \
|
||||
&& mv /usr/bin/caddy /usr/bin/caddy \
|
||||
&& chmod 0755 /usr/bin/caddy
|
||||
RUN go get github.com/abiosoft/caddyplug/caddyplug \
|
||||
&& caddyplug install-caddy \
|
||||
&& caddyplug install git
|
||||
RUN caddy --version
|
||||
|
||||
EXPOSE 80 443 2015
|
||||
|
||||
|
@ -18,11 +18,15 @@ services:
|
||||
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
|
||||
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
|
||||
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
|
||||
- INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP}
|
||||
- INSTALL_IMAP=${WORKSPACE_INSTALL_IMAP}
|
||||
- INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
|
||||
- INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS}
|
||||
- INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL}
|
||||
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
|
||||
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
|
||||
- INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
|
||||
- INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE}
|
||||
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
|
||||
- INSTALL_V8JS=${WORKSPACE_INSTALL_V8JS}
|
||||
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
|
||||
@ -32,9 +36,16 @@ services:
|
||||
- INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER}
|
||||
- INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LINUXBREW}
|
||||
- INSTALL_MC=${WORKSPACE_INSTALL_MC}
|
||||
- INSTALL_SYMFONY=${WORKSPACE_INSTALL_SYMFONY}
|
||||
- INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON}
|
||||
- INSTALL_IMAGE_OPTIMIZERS=${WORKSPACE_INSTALL_IMAGE_OPTIMIZERS}
|
||||
- INSTALL_IMAGEMAGICK=${WORKSPACE_INSTALL_IMAGEMAGICK}
|
||||
- INSTALL_TERRAFORM=${WORKSPACE_INSTALL_TERRAFORM}
|
||||
- INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS}
|
||||
- INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT}
|
||||
- PUID=${WORKSPACE_PUID}
|
||||
- PGID=${WORKSPACE_PGID}
|
||||
- CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION}
|
||||
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
|
||||
- YARN_VERSION=${WORKSPACE_YARN_VERSION}
|
||||
- TZ=${WORKSPACE_TIMEZONE}
|
||||
@ -71,12 +82,15 @@ services:
|
||||
- INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF}
|
||||
- INSTALL_AEROSPIKE=${PHP_FPM_INSTALL_AEROSPIKE}
|
||||
- INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
|
||||
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
|
||||
- INSTALL_PG_CLIENT=${PHP_FPM_INSTALL_PG_CLIENT}
|
||||
- INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER}
|
||||
- INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
|
||||
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}
|
||||
- INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP}
|
||||
- INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE}
|
||||
- INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS}
|
||||
- INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK}
|
||||
dockerfile: "Dockerfile-${PHP_VERSION}"
|
||||
volumes_from:
|
||||
- applications
|
||||
@ -98,6 +112,9 @@ services:
|
||||
php-worker:
|
||||
build:
|
||||
context: ./php-worker
|
||||
dockerfile: "Dockerfile-${PHP_VERSION}"
|
||||
args:
|
||||
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
|
||||
volumes_from:
|
||||
- applications
|
||||
depends_on:
|
||||
@ -107,13 +124,14 @@ services:
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### Nginx Server Container ##################################
|
||||
### NGINX Server Container ##################################
|
||||
|
||||
nginx:
|
||||
build:
|
||||
context: ./nginx
|
||||
args:
|
||||
- PHP_UPSTREAM=php-fpm
|
||||
- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
|
||||
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
|
||||
volumes_from:
|
||||
- applications
|
||||
volumes:
|
||||
@ -146,7 +164,9 @@ services:
|
||||
build:
|
||||
context: ./apache2
|
||||
args:
|
||||
- PHP_SOCKET=${PHP_SOCKET}
|
||||
- PHP_UPSTREAM_CONTAINER=${APACHE_PHP_UPSTREAM_CONTAINER}
|
||||
- PHP_UPSTREAM_PORT=${APACHE_PHP_UPSTREAM_PORT}
|
||||
- PHP_UPSTREAM_TIMEOUT=${APACHE_PHP_UPSTREAM_TIMEOUT}
|
||||
volumes_from:
|
||||
- applications
|
||||
volumes:
|
||||
@ -334,7 +354,7 @@ services:
|
||||
volumes:
|
||||
- ${DATA_SAVE_PATH}/redis:/data
|
||||
ports:
|
||||
- "6379:6379"
|
||||
- "${REDIS_PORT}:6379"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
@ -464,12 +484,15 @@ services:
|
||||
build: ./pgadmin
|
||||
ports:
|
||||
- "5050:5050"
|
||||
volumes:
|
||||
- ${DATA_SAVE_PATH}/pgadmin-backup:/var/lib/pgadmin4/data/storage/pgadmin4
|
||||
depends_on:
|
||||
- postgres
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
|
||||
### ElasticSearch Container #################################
|
||||
|
||||
elasticsearch:
|
||||
@ -533,6 +556,17 @@ services:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
### MailDev Container #######################################
|
||||
|
||||
maildev:
|
||||
build: ./maildev
|
||||
ports:
|
||||
- "${MAILDEV_HTTP_PORT}:80"
|
||||
- "${MAILDEV_SMTP_PORT}:25"
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
### Selenium Container ########################################
|
||||
|
||||
selenium:
|
||||
@ -611,6 +645,18 @@ services:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
### Grafana Container #########################################
|
||||
|
||||
grafana:
|
||||
build:
|
||||
context: ./grafana
|
||||
volumes:
|
||||
- ${DATA_SAVE_PATH}/grafana:/var/lib/grafana
|
||||
ports:
|
||||
- "${GRAFANA_PORT}:3000"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### Laravel Echo Server #######################################
|
||||
laravel-echo-server:
|
||||
build:
|
||||
@ -625,6 +671,16 @@ services:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
### AWS EB-CLI ####
|
||||
aws:
|
||||
build:
|
||||
context: ./aws
|
||||
volumes_from:
|
||||
- applications
|
||||
depends_on:
|
||||
- workspace
|
||||
tty: true
|
||||
|
||||
### Networks Setup ############################################
|
||||
|
||||
networks:
|
||||
|
40
env-example
40
env-example
@ -30,12 +30,16 @@ PHP_INTERPRETER=php-fpm
|
||||
### WORKSPACE ##########################################################################################################
|
||||
|
||||
WORKSPACE_INSTALL_XDEBUG=false
|
||||
WORKSPACE_INSTALL_LDAP=false
|
||||
WORKSPACE_INSTALL_SOAP=false
|
||||
WORKSPACE_INSTALL_IMAP=false
|
||||
WORKSPACE_INSTALL_MONGO=false
|
||||
WORKSPACE_INSTALL_PHPREDIS=false
|
||||
WORKSPACE_INSTALL_MSSQL=false
|
||||
WORKSPACE_INSTALL_NODE=false
|
||||
WORKSPACE_INSTALL_YARN=false
|
||||
WORKSPACE_INSTALL_DRUSH=false
|
||||
WORKSPACE_INSTALL_DRUPAL_CONSOLE=false
|
||||
WORKSPACE_INSTALL_AEROSPIKE=false
|
||||
WORKSPACE_INSTALL_V8JS=false
|
||||
WORKSPACE_COMPOSER_GLOBAL_INSTALL=false
|
||||
@ -45,9 +49,16 @@ WORKSPACE_INSTALL_LARAVEL_INSTALLER=false
|
||||
WORKSPACE_INSTALL_DEPLOYER=false
|
||||
WORKSPACE_INSTALL_LINUXBREW=false
|
||||
WORKSPACE_INSTALL_MC=false
|
||||
WORKSPACE_INSTALL_SYMFONY=false
|
||||
WORKSPACE_INSTALL_PYTHON=false
|
||||
WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false
|
||||
WORKSPACE_INSTALL_IMAGEMAGICK=false
|
||||
WORKSPACE_INSTALL_TERRAFORM=false
|
||||
WORKSPACE_INSTALL_DUSK_DEPS=false
|
||||
WORKSPACE_INSTALL_PG_CLIENT=false
|
||||
WORKSPACE_PUID=1000
|
||||
WORKSPACE_PGID=1000
|
||||
WORKSPACE_CHROME_DRIVER_VERSION=2.32
|
||||
WORKSPACE_NODE_VERSION=stable
|
||||
WORKSPACE_YARN_VERSION=latest
|
||||
WORKSPACE_TIMEZONE=UTC
|
||||
@ -67,12 +78,20 @@ PHP_FPM_INSTALL_OPCACHE=false
|
||||
PHP_FPM_INSTALL_EXIF=false
|
||||
PHP_FPM_INSTALL_AEROSPIKE=false
|
||||
PHP_FPM_INSTALL_MYSQLI=false
|
||||
PHP_FPM_INSTALL_PGSQL=false
|
||||
PHP_FPM_INSTALL_POSTGRES=false
|
||||
PHP_FPM_INSTALL_TOKENIZER=false
|
||||
PHP_FPM_INSTALL_INTL=false
|
||||
PHP_FPM_INSTALL_GHOSTSCRIPT=false
|
||||
PHP_FPM_INSTALL_LDAP=false
|
||||
PHP_FPM_INSTALL_SWOOLE=false
|
||||
PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=false
|
||||
PHP_FPM_INSTALL_IMAGEMAGICK=false
|
||||
PHP_FPM_INSTALL_PG_CLIENT=false
|
||||
|
||||
### PHP_WORKER #########################################################################################################
|
||||
|
||||
PHP_WORKER_INSTALL_PGSQL=false
|
||||
|
||||
### NGINX ##############################################################################################################
|
||||
|
||||
@ -80,15 +99,18 @@ NGINX_HOST_HTTP_PORT=80
|
||||
NGINX_HOST_HTTPS_PORT=443
|
||||
NGINX_HOST_LOG_PATH=./logs/nginx/
|
||||
NGINX_SITES_PATH=./nginx/sites/
|
||||
NGINX_PHP_UPSTREAM_CONTAINER=php-fpm
|
||||
NGINX_PHP_UPSTREAM_PORT=9000
|
||||
|
||||
### APACHE #############################################################################################################
|
||||
|
||||
APACHE_HOST_HTTP_PORT=80
|
||||
APACHE_HOST_HTTPS_PORT=443
|
||||
APACHE2_PHP_SOCKET=php-fpm:9000
|
||||
APACHE_HOST_LOG_PATH=./logs/apache2
|
||||
APACHE_SITES_PATH=./apache2/sites
|
||||
PHP_SOCKET=php-fpm:9000
|
||||
APACHE_PHP_UPSTREAM_CONTAINER=php-fpm
|
||||
APACHE_PHP_UPSTREAM_PORT=9000
|
||||
APACHE_PHP_UPSTREAM_TIMEOUT=60
|
||||
|
||||
### MYSQL ##############################################################################################################
|
||||
|
||||
@ -100,6 +122,10 @@ MYSQL_PORT=3306
|
||||
MYSQL_ROOT_PASSWORD=root
|
||||
MYSQL_ENTRYPOINT_INITDB=./mysql/docker-entrypoint-initdb.d
|
||||
|
||||
### REDIS ##############################################################################################################
|
||||
|
||||
REDIS_PORT=6379
|
||||
|
||||
### Percona ############################################################################################################
|
||||
|
||||
PERCONA_DATABASE=homestead
|
||||
@ -188,6 +214,11 @@ PMA_PASSWORD=secret
|
||||
PMA_ROOT_PASSWORD=secret
|
||||
PMA_PORT=8080
|
||||
|
||||
### MAILDEV ############################################################################################################
|
||||
|
||||
MAILDEV_HTTP_PORT=1080
|
||||
MAILDEV_SMTP_PORT=25
|
||||
|
||||
### VARNISH ############################################################################################################
|
||||
|
||||
VARNISH_CONFIG=/etc/varnish/default.vcl
|
||||
@ -219,6 +250,10 @@ JENKINS_HOST_HTTP_PORT=8090
|
||||
JENKINS_HOST_SLAVE_AGENT_PORT=50000
|
||||
JENKINS_HOME=./jenkins/jenkins_home
|
||||
|
||||
### GRAFANA ############################################################################################################
|
||||
|
||||
GRAFANA_PORT=3000
|
||||
|
||||
### BLACKFIRE ##########################################################################################################
|
||||
|
||||
# Create an account on blackfire.io. Don't enable blackfire and xDebug at the same time.
|
||||
@ -287,4 +322,3 @@ PHP_IDE_CONFIG=serverName=laradock
|
||||
# Fix for windows users to make sure the application path works.
|
||||
|
||||
COMPOSE_CONVERT_WINDOWS_PATHS=1
|
||||
|
||||
|
3
grafana/Dockerfile
Normal file
3
grafana/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM grafana/grafana:latest
|
||||
|
||||
EXPOSE 3000
|
@ -25,8 +25,8 @@ VOLUME /var/jenkins_home
|
||||
# or config file with your custom jenkins Docker image.
|
||||
RUN mkdir -p /usr/share/jenkins/ref/init.groovy.d
|
||||
|
||||
ENV TINI_VERSION 0.13.2
|
||||
ENV TINI_SHA afbf8de8a63ce8e4f18cb3f34dfdbbd354af68a1
|
||||
ENV TINI_VERSION 0.16.1
|
||||
ENV TINI_SHA d1cb5d71adc01d47e302ea439d70c79bd0864288
|
||||
|
||||
# Use tini as subreaper in Docker container to adopt zombie processes
|
||||
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini && chmod +x /bin/tini \
|
||||
@ -36,10 +36,10 @@ COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-agent-port.groov
|
||||
|
||||
# jenkins version being bundled in this docker image
|
||||
ARG JENKINS_VERSION
|
||||
ENV JENKINS_VERSION ${JENKINS_VERSION:-2.32.3}
|
||||
ENV JENKINS_VERSION ${JENKINS_VERSION:-2.73.2}
|
||||
|
||||
# jenkins.war checksum, download will be validated using it
|
||||
ARG JENKINS_SHA=a25b9a314ca9e76f9673da7309e1882e32674223
|
||||
ARG JENKINS_SHA=f6d1351beef34d980b32f8c463be505445f637e2fc62156fecd42891c53c97d3
|
||||
|
||||
# Can be used to customize where jenkins.war get downloaded from
|
||||
ARG JENKINS_URL=https://repo.jenkins-ci.org/public/org/jenkins-ci/main/jenkins-war/${JENKINS_VERSION}/jenkins-war-${JENKINS_VERSION}.war
|
||||
@ -47,7 +47,7 @@ ARG JENKINS_URL=https://repo.jenkins-ci.org/public/org/jenkins-ci/main/jenkins-w
|
||||
# could use ADD but this one does not check Last-Modified header neither does it allow to control checksum
|
||||
# see https://github.com/docker/docker/issues/8331
|
||||
RUN curl -fsSL ${JENKINS_URL} -o /usr/share/jenkins/jenkins.war \
|
||||
&& echo "${JENKINS_SHA} /usr/share/jenkins/jenkins.war" | sha1sum -c -
|
||||
&& echo "${JENKINS_SHA} /usr/share/jenkins/jenkins.war" | sha256sum -c -
|
||||
|
||||
ENV JENKINS_UC https://updates.jenkins.io
|
||||
RUN chown -R ${user} "$JENKINS_HOME" /usr/share/jenkins/ref
|
||||
@ -71,7 +71,7 @@ RUN apt-get install -y curl && curl -sSL https://get.docker.com/ | sh
|
||||
RUN usermod -aG docker jenkins
|
||||
|
||||
# Install Docker-Compose
|
||||
RUN curl -L "https://github.com/docker/compose/releases/download/1.10.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||
RUN curl -L "https://github.com/docker/compose/releases/download/1.16.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||
RUN chmod +x /usr/local/bin/docker-compose
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM node:argon
|
||||
FROM node:alpine
|
||||
|
||||
# Create app directory
|
||||
RUN mkdir -p /usr/src/app
|
||||
|
5
maildev/Dockerfile
Normal file
5
maildev/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM djfarrelly/maildev
|
||||
|
||||
MAINTAINER Maxime Hélias <maximehelias16@gmail.com>
|
||||
|
||||
EXPOSE 80 25
|
@ -4,17 +4,17 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||
|
||||
ADD nginx.conf /etc/nginx/
|
||||
|
||||
ARG PHP_UPSTREAM=php-fpm
|
||||
|
||||
# fix a problem--#397, change application source from dl-cdn.alpinelinux.org to aliyun source.
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories
|
||||
ARG PHP_UPSTREAM_CONTAINER=php-fpm
|
||||
ARG PHP_UPSTREAM_PORT=9000
|
||||
|
||||
RUN apk update \
|
||||
&& apk upgrade \
|
||||
&& apk add --no-cache bash \
|
||||
&& adduser -D -H -u 1000 -s /bin/bash www-data \
|
||||
&& rm /etc/nginx/conf.d/default.conf \
|
||||
&& echo "upstream php-upstream { server ${PHP_UPSTREAM}:9000; }" > /etc/nginx/conf.d/upstream.conf
|
||||
&& adduser -D -H -u 1000 -s /bin/bash www-data
|
||||
|
||||
# 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
|
||||
|
||||
CMD ["nginx"]
|
||||
|
||||
|
@ -3,8 +3,8 @@ server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name project-1.dev;
|
||||
root /var/www/project-1/public;
|
||||
server_name app.dev;
|
||||
root /var/www/app;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location / {
|
||||
@ -29,4 +29,7 @@ server {
|
||||
root /var/www/letsencrypt/;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
error_log /var/log/nginx/app_error.log;
|
||||
access_log /var/log/nginx/app_access.log;
|
||||
}
|
@ -3,8 +3,8 @@ server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name project-2.dev;
|
||||
root /var/www/project-2/public;
|
||||
server_name laravel.dev;
|
||||
root /var/www/laravel/public;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location / {
|
||||
@ -29,4 +29,7 @@ server {
|
||||
root /var/www/letsencrypt/;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
error_log /var/log/nginx/laravel_error.log;
|
||||
access_log /var/log/nginx/laravel_access.log;
|
||||
}
|
28
nginx/sites/symfony.conf.example
Normal file
28
nginx/sites/symfony.conf.example
Normal file
@ -0,0 +1,28 @@
|
||||
server {
|
||||
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name symfony.dev;
|
||||
root /var/www/projects/symfony/web;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location / {
|
||||
try_files $uri @rewriteapp;
|
||||
}
|
||||
|
||||
location @rewriteapp {
|
||||
rewrite ^(.*)$ /app.php/$1 last;
|
||||
}
|
||||
|
||||
location ~ ^/(app|app_dev|config)\.php(/|$) {
|
||||
fastcgi_pass php-upstream;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param HTTPS off;
|
||||
}
|
||||
|
||||
error_log /var/log/nginx/symfony_error.log;
|
||||
access_log /var/log/nginx/symfony_access.log;
|
||||
}
|
@ -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
|
||||
|
@ -50,6 +50,28 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
docker-php-ext-install soap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# pgsql
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PGSQL=false
|
||||
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||
# Install the pgsql extension
|
||||
apt-get update -yqq && \
|
||||
docker-php-ext-install pgsql \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# pgsql client
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PG_CLIENT=false
|
||||
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||
# Install the pgsql clint
|
||||
apt-get update -yqq && \
|
||||
apt-get install -y postgresql-client \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# xDebug:
|
||||
#####################################
|
||||
@ -87,7 +109,7 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis Extension
|
||||
pecl install -o -f redis \
|
||||
printf "\n" | pecl install -o -f redis \
|
||||
&& rm -rf /tmp/pear \
|
||||
&& docker-php-ext-enable redis \
|
||||
;fi
|
||||
@ -269,6 +291,19 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ImageMagick:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get update -y && \
|
||||
apt-get install -y libmagickwand-dev imagemagick && \
|
||||
pecl install imagick && \
|
||||
docker-php-ext-enable imagick \
|
||||
;fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
@ -276,7 +311,7 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
#
|
||||
|
||||
ADD ./laravel.ini /usr/local/etc/php/conf.d
|
||||
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
#RUN rm -r /var/lib/apt/lists/*
|
||||
|
||||
|
@ -50,6 +50,28 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
docker-php-ext-install soap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# pgsql
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PGSQL=false
|
||||
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||
# Install the pgsql extension
|
||||
apt-get update -yqq && \
|
||||
docker-php-ext-install pgsql \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# pgsql client
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PG_CLIENT=false
|
||||
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||
# Install the pgsql client
|
||||
apt-get update -yqq && \
|
||||
apt-get install -y postgresql-client \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# xDebug:
|
||||
#####################################
|
||||
@ -84,7 +106,7 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis Extension
|
||||
pecl install -o -f redis \
|
||||
printf "\n" | pecl install -o -f redis \
|
||||
&& rm -rf /tmp/pear \
|
||||
&& docker-php-ext-enable redis \
|
||||
;fi
|
||||
@ -173,11 +195,11 @@ ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
|
||||
RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
|
||||
# Install the php aerospike extension
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/3.4.14.tar.gz" \
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" \
|
||||
&& mkdir -p aerospike-client-php \
|
||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd aerospike-client-php/src/aerospike \
|
||||
cd aerospike-client-php/src \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
@ -293,6 +315,19 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ImageMagick:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get update -y && \
|
||||
apt-get install -y libmagickwand-dev imagemagick && \
|
||||
pecl install imagick && \
|
||||
docker-php-ext-enable imagick \
|
||||
;fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
@ -300,7 +335,7 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
#
|
||||
|
||||
ADD ./laravel.ini /usr/local/etc/php/conf.d/
|
||||
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
#RUN rm -r /var/lib/apt/lists/*
|
||||
|
||||
|
@ -50,6 +50,28 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
docker-php-ext-install soap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# pgsql
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PGSQL=false
|
||||
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||
# Install the pgsql extension
|
||||
apt-get update -yqq && \
|
||||
docker-php-ext-install pgsql \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# pgsql client
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PG_CLIENT=false
|
||||
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||
# Install the pgsql client
|
||||
apt-get update -yqq && \
|
||||
apt-get install -y postgresql-client \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# xDebug:
|
||||
#####################################
|
||||
@ -61,7 +83,7 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
docker-php-ext-enable xdebug \
|
||||
;fi
|
||||
|
||||
# Copy xdebug configration for remote debugging
|
||||
# Copy xdebug configuration for remote debugging
|
||||
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
#####################################
|
||||
@ -78,13 +100,13 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP REDIS EXTENSION FOR PHP 7
|
||||
# PHP REDIS EXTENSION FOR PHP 7.0
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis Extension
|
||||
pecl install -o -f redis \
|
||||
printf "\n" | pecl install -o -f redis \
|
||||
&& rm -rf /tmp/pear \
|
||||
&& docker-php-ext-enable redis \
|
||||
;fi
|
||||
@ -179,11 +201,11 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
|
||||
apt-get -y install sudo wget && \
|
||||
|
||||
# Install the php aerospike extension
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/3.4.14.tar.gz" \
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" \
|
||||
&& mkdir -p aerospike-client-php \
|
||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd aerospike-client-php/src/aerospike \
|
||||
cd aerospike-client-php/src \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
@ -300,6 +322,19 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ImageMagick:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get update -y && \
|
||||
apt-get install -y libmagickwand-dev imagemagick && \
|
||||
pecl install imagick && \
|
||||
docker-php-ext-enable imagick \
|
||||
;fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
@ -307,7 +342,7 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
#
|
||||
|
||||
ADD ./laravel.ini /usr/local/etc/php/conf.d
|
||||
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
#RUN rm -r /var/lib/apt/lists/*
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
extension=aerospike.so
|
||||
aerospike.udf.lua_system_path=/usr/local/aerospike/lua
|
||||
aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua
|
@ -1442,7 +1442,7 @@ session.save_handler = files
|
||||
; where MODE is the octal representation of the mode. Note that this
|
||||
; does not overwrite the process's umask.
|
||||
; http://php.net/session.save-path
|
||||
;session.save_path = "/tmp"
|
||||
session.save_path = "/tmp"
|
||||
|
||||
; Whether to use strict session mode.
|
||||
; Strict session mode does not accept uninitialized session ID and regenerate
|
||||
|
@ -1348,7 +1348,7 @@ session.save_handler = files
|
||||
; where MODE is the octal representation of the mode. Note that this
|
||||
; does not overwrite the process's umask.
|
||||
; http://php.net/session.save-path
|
||||
;session.save_path = "/tmp"
|
||||
session.save_path = "/tmp"
|
||||
|
||||
; Whether to use strict session mode.
|
||||
; Strict session mode does not accept uninitialized session ID and regenerate
|
||||
|
@ -1348,7 +1348,7 @@ session.save_handler = files
|
||||
; where MODE is the octal representation of the mode. Note that this
|
||||
; does not overwrite the process's umask.
|
||||
; http://php.net/session.save-path
|
||||
;session.save_path = "/tmp"
|
||||
session.save_path = "/tmp"
|
||||
|
||||
; Whether to use strict session mode.
|
||||
; Strict session mode does not accept uninitialized session ID and regenerate
|
||||
|
@ -3,14 +3,37 @@
|
||||
# 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>
|
||||
|
||||
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
|
||||
|
||||
# Install PostgreSQL drivers:
|
||||
ARG INSTALL_PGSQL=false
|
||||
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||
apk --update add postgresql-dev \
|
||||
&& docker-php-ext-install pdo_pgsql \
|
||||
;fi
|
||||
|
||||
RUN rm /var/cache/apk/* \
|
||||
&& mkdir -p /var/www
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Optional Supervisord Configuration
|
||||
@ -19,7 +42,10 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||
# Modify the ./supervisor.conf file to match your App's requirements.
|
||||
# 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"]
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
@ -37,5 +63,4 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
RUN rm -r /var/lib/apt/lists/*
|
||||
WORKDIR /etc/supervisor/conf.d/
|
66
php-worker/Dockerfile-71
Normal file
66
php-worker/Dockerfile-71
Normal file
@ -0,0 +1,66 @@
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# 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
|
||||
|
||||
# Install PostgreSQL drivers:
|
||||
ARG INSTALL_PGSQL=false
|
||||
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||
apk --update add postgresql-dev \
|
||||
&& docker-php-ext-install pdo_pgsql \
|
||||
;fi
|
||||
|
||||
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/
|
@ -1,7 +1,7 @@
|
||||
FROM postgres:latest
|
||||
FROM postgres:alpine
|
||||
|
||||
MAINTAINER Ben M <git@bmagg.com>
|
||||
|
||||
CMD ["postgres"]
|
||||
|
||||
EXPOSE 5432
|
||||
EXPOSE 5432
|
||||
|
@ -26,7 +26,7 @@ if [ -n "${HUGO_VERSION}" ]; then
|
||||
|
||||
# Download hugo binary
|
||||
curl -L https://github.com/spf13/hugo/releases/download/v$HUGO_VERSION/$HUGO_PACKAGE.tar.gz | tar xz
|
||||
mkdir $HOME/bin
|
||||
mkdir -p $HOME/bin
|
||||
mv ./${HUGO_BIN}/${HUGO_BIN} $HOME/bin/hugo
|
||||
|
||||
# Remove existing docs
|
||||
|
@ -12,7 +12,7 @@
|
||||
# Note: Base Image name format {image-tag}-{php-version}
|
||||
#
|
||||
|
||||
FROM laradock/workspace:1.8-56
|
||||
FROM laradock/workspace:1.9-56
|
||||
|
||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||
|
||||
@ -69,6 +69,21 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
apt-get -y install libxml2-dev php5.6-soap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# IMAP:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_IMAP=false
|
||||
ENV INSTALL_IMAP ${INSTALL_IMAP}
|
||||
|
||||
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
||||
# Install the PHP IMAP extension
|
||||
add-apt-repository -y ppa:ondrej/php && \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install php5.6-imap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Set Timezone
|
||||
#####################################
|
||||
@ -189,11 +204,25 @@ ARG INSTALL_MONGO=false
|
||||
ENV INSTALL_MONGO ${INSTALL_MONGO}
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
pecl channel-update pecl.php.net && \
|
||||
pecl install mongodb && \
|
||||
echo "extension=mongodb.so" >> /etc/php/5.6/mods-available/mongodb.ini && \
|
||||
ln -s /etc/php/5.6/mods-available/mongodb.ini /etc/php/5.6/cli/conf.d/30-mongodb.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP REDIS EXTENSION FOR PHP 5.6
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
ENV INSTALL_PHPREDIS ${INSTALL_PHPREDIS}
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis extension
|
||||
printf "\n" | pecl -q install -o -f redis && \
|
||||
echo "extension=redis.so" >> /etc/php/5.6/mods-available/redis.ini && \
|
||||
phpenmod redis \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Drush:
|
||||
#####################################
|
||||
@ -202,12 +231,28 @@ ENV DRUSH_VERSION 8.1.2
|
||||
ARG INSTALL_DRUSH=false
|
||||
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
||||
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install mysql-client && \
|
||||
# Install Drush 8 with the phar file.
|
||||
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar | bash && \
|
||||
chmod +x /usr/local/bin/drush && \
|
||||
drush core-status \
|
||||
;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
|
||||
|
||||
#####################################
|
||||
@ -247,6 +292,9 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add PATH for node
|
||||
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
|
||||
|
||||
#####################################
|
||||
# YARN:
|
||||
#####################################
|
||||
@ -317,14 +365,6 @@ USER laradock
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# Laravel Artisan Alias
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo 'alias art="php artisan"' >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# Laravel Envoy:
|
||||
#####################################
|
||||
@ -440,6 +480,107 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
|
||||
USER laradock
|
||||
|
||||
#####################################
|
||||
# Symfony:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_SYMFONY=false
|
||||
ENV INSTALL_SYMFONY ${INSTALL_SYMFONY}
|
||||
RUN if [ ${INSTALL_SYMFONY} = true ]; then \
|
||||
|
||||
mkdir -p /usr/local/bin \
|
||||
&& curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony \
|
||||
&& chmod a+x /usr/local/bin/symfony \
|
||||
|
||||
# Symfony 3 alias
|
||||
&& echo 'alias dev="php bin/console -e=dev"' >> ~/.bashrc \
|
||||
&& echo 'alias prod="php bin/console -e=prod"' >> ~/.bashrc \
|
||||
|
||||
# Symfony 2 alias
|
||||
# && echo 'alias dev="php app/console -e=dev"' >> ~/.bashrc \
|
||||
# && echo 'alias prod="php app/console -e=prod"' >> ~/.bashrc \
|
||||
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PYTHON:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PYTHON=false
|
||||
ENV INSTALL_PYTHON ${INSTALL_PYTHON}
|
||||
RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
||||
apt-get update \
|
||||
&& apt-get -y install python python-pip python-dev build-essential \
|
||||
&& pip install --upgrade pip \
|
||||
&& pip install --upgrade virtualenv \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ImageMagick:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get install -y --force-yes imagemagick php-imagick \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Terraform:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_TERRAFORM=false
|
||||
ENV INSTALL_TERRAFORM ${INSTALL_TERRAFORM}
|
||||
RUN if [ ${INSTALL_TERRAFORM} = true ]; then \
|
||||
apt-get update -yqq \
|
||||
&& apt-get -y install sudo wget unzip \
|
||||
&& wget https://releases.hashicorp.com/terraform/0.10.6/terraform_0.10.6_linux_amd64.zip \
|
||||
&& unzip terraform_0.10.6_linux_amd64.zip \
|
||||
&& mv terraform /usr/local/bin \
|
||||
&& rm terraform_0.10.6_linux_amd64.zip \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# pgsql client
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_PG_CLIENT=false
|
||||
ENV INSTALL_PG_CLIENT ${INSTALL_PG_CLIENT}
|
||||
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||
# Install the pgsql clint
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install postgresql-client \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Dusk Dependencies:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_DUSK_DEPS=false
|
||||
ENV INSTALL_DUSK_DEPS ${INSTALL_DUSK_DEPS}
|
||||
RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \
|
||||
# Install required packages
|
||||
add-apt-repository ppa:ondrej/php \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install zip wget unzip xdg-utils \
|
||||
libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 xvfb \
|
||||
gtk2-engines-pixbuf xfonts-cyrillic xfonts-100dpi xfonts-75dpi \
|
||||
xfonts-base xfonts-scalable x11-apps \
|
||||
|
||||
# Install Google Chrome
|
||||
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
|
||||
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
|
||||
&& apt-get -y -f install \
|
||||
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
|
||||
&& rm google-chrome-stable_current_amd64.deb \
|
||||
|
||||
# Install Chrome Driver
|
||||
&& wget https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip \
|
||||
&& unzip chromedriver_linux64.zip \
|
||||
&& mv chromedriver /usr/local/bin/ \
|
||||
&& rm chromedriver_linux64.zip \
|
||||
;fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
|
@ -12,7 +12,7 @@
|
||||
# Note: Base Image name format {image-tag}-{php-version}
|
||||
#
|
||||
|
||||
FROM laradock/workspace:1.8-70
|
||||
FROM laradock/workspace:1.9-70
|
||||
|
||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||
|
||||
@ -69,6 +69,31 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
apt-get -y install libxml2-dev php7.0-soap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# LDAP:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_LDAP=false
|
||||
ENV INSTALL_LDAP ${INSTALL_LDAP}
|
||||
|
||||
RUN if [ ${INSTALL_LDAP} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get install -y libldap2-dev && \
|
||||
apt-get install -y php7.0-ldap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# IMAP:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_IMAP=false
|
||||
ENV INSTALL_IMAP ${INSTALL_IMAP}
|
||||
|
||||
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get install -y php7.0-imap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Set Timezone
|
||||
#####################################
|
||||
@ -194,6 +219,19 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
ln -s /etc/php/7.0/mods-available/mongodb.ini /etc/php/7.0/cli/conf.d/30-mongodb.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP REDIS EXTENSION FOR PHP 7
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
ENV INSTALL_PHPREDIS ${INSTALL_PHPREDIS}
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis extension
|
||||
printf "\n" | pecl -q install -o -f redis && \
|
||||
echo "extension=redis.so" >> /etc/php/7.0/mods-available/redis.ini && \
|
||||
phpenmod redis \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Drush:
|
||||
#####################################
|
||||
@ -202,12 +240,28 @@ ENV DRUSH_VERSION 8.1.2
|
||||
ARG INSTALL_DRUSH=false
|
||||
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
||||
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install mysql-client && \
|
||||
# Install Drush 8 with the phar file.
|
||||
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar | bash && \
|
||||
chmod +x /usr/local/bin/drush && \
|
||||
drush core-status \
|
||||
;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
|
||||
|
||||
#####################################
|
||||
@ -247,6 +301,9 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add PATH for node
|
||||
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
|
||||
|
||||
#####################################
|
||||
# YARN:
|
||||
#####################################
|
||||
@ -291,11 +348,11 @@ COPY ./aerospike.ini /etc/php/7.0/cli/conf.d/aerospike.ini
|
||||
|
||||
RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
|
||||
# Install the php aerospike extension
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/3.4.14.tar.gz" \
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" \
|
||||
&& mkdir -p aerospike-client-php \
|
||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd aerospike-client-php/src/aerospike \
|
||||
cd aerospike-client-php/src \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
@ -334,14 +391,6 @@ USER laradock
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# Laravel Artisan Alias
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo 'alias art="php artisan"' >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# Laravel Envoy:
|
||||
#####################################
|
||||
@ -508,6 +557,19 @@ RUN if [ ${INSTALL_MC} = true ]; then\
|
||||
chmod +x /usr/local/bin/mc \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Image optimizers:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
||||
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
|
||||
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \
|
||||
if [ ${INSTALL_NODE} = true ]; then \
|
||||
. ~/.bashrc && npm install -g svgo \
|
||||
;fi\
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Symfony:
|
||||
#####################################
|
||||
@ -531,16 +593,82 @@ RUN if [ ${INSTALL_SYMFONY} = true ]; then \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Image optimizers:
|
||||
# PYTHON:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PYTHON=false
|
||||
ENV INSTALL_PYTHON ${INSTALL_PYTHON}
|
||||
RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
||||
apt-get update \
|
||||
&& apt-get -y install python python-pip python-dev build-essential \
|
||||
&& pip install --upgrade pip \
|
||||
&& pip install --upgrade virtualenv \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ImageMagick:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
||||
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
|
||||
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \
|
||||
if [ ${INSTALL_NODE} = true ]; then \
|
||||
. ~/.bashrc && npm install -g svgo \
|
||||
;fi\
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get install -y --force-yes imagemagick php-imagick \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Terraform:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_TERRAFORM=false
|
||||
ENV INSTALL_TERRAFORM ${INSTALL_TERRAFORM}
|
||||
RUN if [ ${INSTALL_TERRAFORM} = true ]; then \
|
||||
apt-get update -yqq \
|
||||
&& apt-get -y install sudo wget unzip \
|
||||
&& wget https://releases.hashicorp.com/terraform/0.10.6/terraform_0.10.6_linux_amd64.zip \
|
||||
&& unzip terraform_0.10.6_linux_amd64.zip \
|
||||
&& mv terraform /usr/local/bin \
|
||||
&& rm terraform_0.10.6_linux_amd64.zip \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# pgsql client
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_PG_CLIENT=false
|
||||
ENV INSTALL_PG_CLIENT ${INSTALL_PG_CLIENT}
|
||||
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||
# Install the pgsql client
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install postgresql-client \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Dusk Dependencies:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_DUSK_DEPS=false
|
||||
ENV INSTALL_DUSK_DEPS ${INSTALL_DUSK_DEPS}
|
||||
RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \
|
||||
# Install required packages
|
||||
add-apt-repository ppa:ondrej/php \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install zip wget unzip xdg-utils \
|
||||
libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 xvfb \
|
||||
gtk2-engines-pixbuf xfonts-cyrillic xfonts-100dpi xfonts-75dpi \
|
||||
xfonts-base xfonts-scalable x11-apps \
|
||||
|
||||
# Install Google Chrome
|
||||
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
|
||||
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
|
||||
&& apt-get -y -f install \
|
||||
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
|
||||
&& rm google-chrome-stable_current_amd64.deb \
|
||||
|
||||
# Install Chrome Driver
|
||||
&& wget https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip \
|
||||
&& unzip chromedriver_linux64.zip \
|
||||
&& mv chromedriver /usr/local/bin/ \
|
||||
&& rm chromedriver_linux64.zip \
|
||||
;fi
|
||||
|
||||
#
|
||||
|
@ -12,7 +12,7 @@
|
||||
# Note: Base Image name format {image-tag}-{php-version}
|
||||
#
|
||||
|
||||
FROM laradock/workspace:1.8-71
|
||||
FROM laradock/workspace:1.9-71
|
||||
|
||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||
|
||||
@ -52,7 +52,8 @@ ENV PGID ${PGID}
|
||||
|
||||
RUN groupadd -g ${PGID} laradock && \
|
||||
useradd -u ${PUID} -g laradock -m laradock && \
|
||||
apt-get update -yqq
|
||||
apt-get update -yqq \
|
||||
apt-get install -y python2.7
|
||||
|
||||
#####################################
|
||||
# SOAP:
|
||||
@ -69,6 +70,31 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
apt-get -y install libxml2-dev php7.1-soap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# LDAP:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_LDAP=false
|
||||
ENV INSTALL_LDAP ${INSTALL_LDAP}
|
||||
|
||||
RUN if [ ${INSTALL_LDAP} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get install -y libldap2-dev && \
|
||||
apt-get install -y php7.1-ldap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# IMAP:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_IMAP=false
|
||||
ENV INSTALL_IMAP ${INSTALL_IMAP}
|
||||
|
||||
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get install -y php7.1-imap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Set Timezone
|
||||
#####################################
|
||||
@ -186,11 +212,24 @@ ARG INSTALL_MONGO=false
|
||||
ENV INSTALL_MONGO ${INSTALL_MONGO}
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
pecl install mongodb && \
|
||||
pecl -q install mongodb && \
|
||||
echo "extension=mongodb.so" >> /etc/php/7.1/mods-available/mongodb.ini && \
|
||||
ln -s /etc/php/7.1/mods-available/mongodb.ini /etc/php/7.1/cli/conf.d/30-mongodb.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP REDIS EXTENSION FOR PHP 7.1
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
ENV INSTALL_PHPREDIS ${INSTALL_PHPREDIS}
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis extension
|
||||
printf "\n" | pecl -q install -o -f redis && \
|
||||
echo "extension=redis.so" >> /etc/php/7.1/mods-available/redis.ini && \
|
||||
phpenmod redis \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Drush:
|
||||
#####################################
|
||||
@ -199,12 +238,28 @@ ENV DRUSH_VERSION 8.1.2
|
||||
ARG INSTALL_DRUSH=false
|
||||
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
||||
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install mysql-client && \
|
||||
# Install Drush 8 with the phar file.
|
||||
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar | bash && \
|
||||
chmod +x /usr/local/bin/drush && \
|
||||
drush core-status \
|
||||
;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
|
||||
|
||||
#####################################
|
||||
@ -244,6 +299,10 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add PATH for node
|
||||
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
|
||||
|
||||
|
||||
#####################################
|
||||
# YARN:
|
||||
#####################################
|
||||
@ -292,11 +351,11 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
|
||||
apt-get -y install sudo wget && \
|
||||
|
||||
# Install the php aerospike extension
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/3.4.14.tar.gz" \
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" \
|
||||
&& mkdir -p aerospike-client-php \
|
||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd aerospike-client-php/src/aerospike \
|
||||
cd aerospike-client-php/src \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
@ -335,14 +394,6 @@ USER laradock
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# Laravel Artisan Alias
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo 'alias art="php artisan"' >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# Laravel Envoy:
|
||||
#####################################
|
||||
@ -511,6 +562,21 @@ RUN if [ ${INSTALL_MC} = true ]; then\
|
||||
chmod +x /usr/local/bin/mc \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Image optimizers:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
||||
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
|
||||
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \
|
||||
if [ ${INSTALL_NODE} = true ]; then \
|
||||
. ~/.bashrc && npm install -g svgo \
|
||||
;fi\
|
||||
;fi
|
||||
|
||||
USER laradock
|
||||
|
||||
#####################################
|
||||
# Symfony:
|
||||
#####################################
|
||||
@ -534,19 +600,79 @@ RUN if [ ${INSTALL_SYMFONY} = true ]; then \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Image optimizers:
|
||||
# PYTHON:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
||||
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
|
||||
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \
|
||||
if [ ${INSTALL_NODE} = true ]; then \
|
||||
. ~/.bashrc && npm install -g svgo \
|
||||
;fi\
|
||||
|
||||
ARG INSTALL_PYTHON=false
|
||||
ENV INSTALL_PYTHON ${INSTALL_PYTHON}
|
||||
RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
||||
apt-get update \
|
||||
&& apt-get -y install python python-pip python-dev build-essential \
|
||||
&& pip install --upgrade pip \
|
||||
&& pip install --upgrade virtualenv \
|
||||
;fi
|
||||
|
||||
USER laradock
|
||||
#####################################
|
||||
# ImageMagick:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get install -y --force-yes imagemagick php-imagick \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Terraform:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_TERRAFORM=false
|
||||
ENV INSTALL_TERRAFORM ${INSTALL_TERRAFORM}
|
||||
RUN if [ ${INSTALL_TERRAFORM} = true ]; then \
|
||||
apt-get update -yqq \
|
||||
&& apt-get -y install sudo wget unzip \
|
||||
&& wget https://releases.hashicorp.com/terraform/0.10.6/terraform_0.10.6_linux_amd64.zip \
|
||||
&& unzip terraform_0.10.6_linux_amd64.zip \
|
||||
&& mv terraform /usr/local/bin \
|
||||
&& rm terraform_0.10.6_linux_amd64.zip \
|
||||
;fi
|
||||
#####################################
|
||||
# pgsql client
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_PG_CLIENT=false
|
||||
ENV INSTALL_PG_CLIENT ${INSTALL_PG_CLIENT}
|
||||
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||
# Install the pgsql clint
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install postgresql-client \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Dusk Dependencies:
|
||||
#####################################
|
||||
USER root
|
||||
ARG CHROME_DRIVER_VERSION=stable
|
||||
ENV CHROME_DRIVER_VERSION ${CHROME_DRIVER_VERSION}
|
||||
ARG INSTALL_DUSK_DEPS=false
|
||||
ENV INSTALL_DUSK_DEPS ${INSTALL_DUSK_DEPS}
|
||||
RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \
|
||||
add-apt-repository ppa:ondrej/php \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install zip wget unzip xdg-utils \
|
||||
libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 xvfb \
|
||||
gtk2-engines-pixbuf xfonts-cyrillic xfonts-100dpi xfonts-75dpi \
|
||||
xfonts-base xfonts-scalable x11-apps \
|
||||
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
|
||||
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
|
||||
&& apt-get -y -f install \
|
||||
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
|
||||
&& rm google-chrome-stable_current_amd64.deb \
|
||||
&& wget https://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VERSION}/chromedriver_linux64.zip \
|
||||
&& unzip chromedriver_linux64.zip \
|
||||
&& mv chromedriver /usr/local/bin/ \
|
||||
&& rm chromedriver_linux64.zip \
|
||||
;fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
@ -557,7 +683,8 @@ USER laradock
|
||||
# Clean up
|
||||
USER root
|
||||
RUN apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
npm config set python /usr/bin/python2.7
|
||||
|
||||
# Set default work directory
|
||||
WORKDIR /var/www
|
||||
|
@ -10,42 +10,94 @@ COL_BLUE=$ESC_SEQ"34;01m"
|
||||
COL_MAGENTA=$ESC_SEQ"35;01m"
|
||||
COL_CYAN=$ESC_SEQ"36;01m"
|
||||
|
||||
# Detect which `ls` flavor is in use
|
||||
if ls --color > /dev/null 2>&1; then # GNU `ls`
|
||||
colorflag="--color"
|
||||
export LS_COLORS='no=00:fi=00:di=01;31:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:'
|
||||
else # macOS `ls`
|
||||
colorflag="-G"
|
||||
export LSCOLORS='BxBxhxDxfxhxhxhxhxcxcx'
|
||||
fi
|
||||
|
||||
# List all files colorized in long format
|
||||
#alias l="ls -lF ${colorflag}"
|
||||
### MEGA: I want l and la ti return hisdden files
|
||||
alias l="ls -laF ${colorflag}"
|
||||
|
||||
# List all files colorized in long format, including dot files
|
||||
alias la="ls -laF ${colorflag}"
|
||||
|
||||
# List only directories
|
||||
alias lsd="ls -lF ${colorflag} | grep --color=never '^d'"
|
||||
|
||||
# Always use color output for `ls`
|
||||
alias ls="command ls ${colorflag}"
|
||||
|
||||
# Commonly Used Aliases
|
||||
alias ..="cd .."
|
||||
alias ...="cd ../.."
|
||||
alias ....="cd ../../.."
|
||||
alias .....="cd ../../../.."
|
||||
alias ~="cd ~" # `cd` is probably faster to type though
|
||||
alias -- -="cd -"
|
||||
alias home="cd ~"
|
||||
|
||||
alias h="history"
|
||||
alias j="jobs"
|
||||
alias e='exit'
|
||||
alias c="clear"
|
||||
alias cla="clear && ls -l"
|
||||
alias cll="clear && ls -la"
|
||||
alias cls="clear && ls"
|
||||
alias code="cd /var/www"
|
||||
alias ea="vi ~/aliases"
|
||||
|
||||
# Always enable colored `grep` output
|
||||
# Note: `GREP_OPTIONS="--color=auto"` is deprecated, hence the alias usage.
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
|
||||
alias art="php artisan"
|
||||
alias artisan="php artisan"
|
||||
alias cdump="composer dump-autoload -o"
|
||||
alias composer:dump="composer dump-autoload -o"
|
||||
alias db:reset="php artisan migrate:reset && php artisan migrate --seed"
|
||||
alias dusk="php artisan dusk"
|
||||
alias fresh="php artisan migrate:fresh"
|
||||
alias migrate="php artisan migrate"
|
||||
alias refresh="php artisan migrate:refresh"
|
||||
alias rollback="php artisan migrate:rollback"
|
||||
alias seed="php artisan:seed"
|
||||
alias serve="php artisan serve --quiet &"
|
||||
|
||||
alias phpunit="./vendor/bin/phpunit"
|
||||
alias pu="phpunit"
|
||||
alias puf="phpunit --filter"
|
||||
alias pud='phpunit --debug'
|
||||
|
||||
alias cc='codecept'
|
||||
alias ccb='codecept build'
|
||||
alias ccr='codecept run'
|
||||
alias ccu='codecept run unit'
|
||||
alias ccf='codecept run functional'
|
||||
|
||||
alias g="gulp"
|
||||
alias home="cd ~"
|
||||
alias npm-global="npm list -g --depth 0"
|
||||
alias ra="reload"
|
||||
alias reload="source ~/.aliases && echo \"$COL_GREEN ==> Aliases Reloaded... $COL_RESET \n \""
|
||||
alias run="npm run"
|
||||
alias tree="xtree"
|
||||
|
||||
# Laravel / PHP Alisases
|
||||
alias art="php artisan"
|
||||
alias artisan="php artisan"
|
||||
alias cdump="composer dump-autoload -o"
|
||||
alias composer:dump="composer dump-autoload -o"
|
||||
alias db:reset="php artisan migrate:reset && php artisan migrate --seed"
|
||||
alias migrate="php artisan migrate"
|
||||
alias seed="php artisan:seed"
|
||||
alias phpunit="./vendor/bin/phpunit"
|
||||
|
||||
# Xvfb
|
||||
alias xvfb="Xvfb -ac :0 -screen 0 1024x768x16 &"
|
||||
|
||||
# requires installation of 'https://www.npmjs.com/package/npms-cli'
|
||||
alias npms="npms search"
|
||||
|
||||
# requires installation of 'https://www.npmjs.com/package/package-menu-cli'
|
||||
alias pm="package-menu"
|
||||
|
||||
# requires installation of 'https://www.npmjs.com/package/pkg-version-cli'
|
||||
alias pv="package-version"
|
||||
|
||||
# requires installation of 'https://github.com/sindresorhus/latest-version-cli'
|
||||
alias lv="latest-version"
|
||||
|
||||
@ -56,7 +108,6 @@ alias git-revert="git reset --hard && git clean -df"
|
||||
alias gs="git status"
|
||||
alias whoops="git reset --hard && git clean -df"
|
||||
|
||||
|
||||
# Create a new directory and enter it
|
||||
function mkd() {
|
||||
mkdir -p "$@" && cd "$@"
|
||||
@ -69,3 +120,25 @@ function md() {
|
||||
function xtree {
|
||||
find ${1:-.} -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
|
||||
}
|
||||
|
||||
# `tre` is a shorthand for `tree` with hidden files and color enabled, ignoring
|
||||
# the `.git` directory, listing directories first. The output gets piped into
|
||||
# `less` with options to preserve color and line numbers, unless the output is
|
||||
# small enough for one screen.
|
||||
function tre() {
|
||||
tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX;
|
||||
}
|
||||
|
||||
# Determine size of a file or total size of a directory
|
||||
function fs() {
|
||||
if du -b /dev/null > /dev/null 2>&1; then
|
||||
local arg=-sbh;
|
||||
else
|
||||
local arg=-sh;
|
||||
fi
|
||||
if [[ -n "$@" ]]; then
|
||||
du $arg -- "$@";
|
||||
else
|
||||
du $arg .[^.]* ./*;
|
||||
fi;
|
||||
}
|
||||
|
Reference in New Issue
Block a user