Compare commits
122 Commits
Author | SHA1 | Date | |
---|---|---|---|
d32cfb31b1 | |||
e671f4c929 | |||
aef2769e60 | |||
63816ab7d6 | |||
e7a16bb98e | |||
e496a82150 | |||
f258b38a18 | |||
a80fb99d21 | |||
6b0ee10988 | |||
1e2d368e43 | |||
829a5b5acf | |||
112e31a933 | |||
8af22b5b37 | |||
7029118f05 | |||
a1f8ef9614 | |||
97d198e967 | |||
722e73a3e6 | |||
1d2f385586 | |||
7b180524e3 | |||
a670dd91cd | |||
a0f1d39ce4 | |||
6bed8d14f1 | |||
e26ff8bb1e | |||
7fdda613a5 | |||
b7d3691c8d | |||
b0a6f2d689 | |||
8e20ec7617 | |||
a38cecef92 | |||
3bf572b7a4 | |||
2acc9f5d6f | |||
abae2dc09e | |||
407fb7a395 | |||
0c1b6ba9bf | |||
855e2a47b5 | |||
988bbf7bde | |||
ef7f251654 | |||
3d29c62bfb | |||
3e5d1d919a | |||
a38794ebcc | |||
56ca814ebb | |||
c17abbea6e | |||
0d5080d6bb | |||
e9a01c0174 | |||
5ea7b98db8 | |||
5eae7f3006 | |||
d83c9be2ea | |||
9585a4a7ab | |||
42fc8b7b57 | |||
0aa63c40f8 | |||
f59b9ebda6 | |||
b2c6e53bfa | |||
9970a00533 | |||
3752f48249 | |||
0baf791728 | |||
11687ffd36 | |||
aa22f5d648 | |||
00a38fe274 | |||
fe096ce282 | |||
b4ca9c5596 | |||
d85b76f0d1 | |||
f2a9712041 | |||
09bf0566af | |||
b8c5163c03 | |||
9dda2f6b9f | |||
ca5a1ee674 | |||
0e93477db0 | |||
7765df1076 | |||
fe38f0c2ff | |||
7ec8b8846e | |||
422d6d8dd0 | |||
d021777b06 | |||
f2f665dc08 | |||
02e2454c79 | |||
9d2be424de | |||
bf60f7520b | |||
916e9f38f3 | |||
ebc24ced66 | |||
3e59a2a813 | |||
50834268a7 | |||
007017a2a7 | |||
094aa9beb1 | |||
19f9b25a46 | |||
bc1c957f47 | |||
7c9f9c1ecd | |||
63152e11fa | |||
27c6de1fb1 | |||
70e01125fd | |||
26d7fb01ed | |||
d181a69a73 | |||
106f8ec7af | |||
1951834150 | |||
4c732aa5d6 | |||
bbbd247653 | |||
c35445b066 | |||
72198ed38c | |||
ab464d93d3 | |||
e56587ec47 | |||
bbea2f0bab | |||
9db39ad36f | |||
f009ba752b | |||
03b551f9d6 | |||
30df311ec2 | |||
262b9f20a3 | |||
3eb8fce4f9 | |||
05f8166bef | |||
1bdf113767 | |||
392960dc98 | |||
26ee54a4ad | |||
cbfd160cbf | |||
7207ccbbeb | |||
6e09e2a774 | |||
0561199914 | |||
430a5f21cf | |||
0290142bf4 | |||
5745a50d15 | |||
18b6c1b907 | |||
4a663649c0 | |||
7c9d7a6de6 | |||
d0e5d50712 | |||
da60b32a04 | |||
5a47080859 | |||
9e81f92d58 |
46
.github/CODE_OF_CONDUCT.md
vendored
Normal file
46
.github/CODE_OF_CONDUCT.md
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at mahmoud@zalt.me. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||||
|
|
||||||
|
[homepage]: http://contributor-covenant.org
|
||||||
|
[version]: http://contributor-covenant.org/version/1/4/
|
3
.github/CONTRIBUTING.md
vendored
Normal file
3
.github/CONTRIBUTING.md
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
### First off, thanks for taking the time to contribute!
|
||||||
|
|
||||||
|
For the contribution guide [click here](http://laradock.io/contributing/).
|
11
.github/ISSUE_TEMPLATE.md
vendored
11
.github/ISSUE_TEMPLATE.md
vendored
@ -5,22 +5,19 @@
|
|||||||
- System info disto/version:
|
- System info disto/version:
|
||||||
|
|
||||||
### Issue:
|
### Issue:
|
||||||
##### What seems to be going wrong?
|
<!--- What seems to be wrong? -->
|
||||||
|
|
||||||
_____
|
_____
|
||||||
|
|
||||||
### Expected behavior:
|
### Expected behavior:
|
||||||
##### What should be happening instead?
|
<!--- What should happen instead? -->
|
||||||
|
|
||||||
_____
|
_____
|
||||||
|
|
||||||
### Reproduce:
|
### Reproduce:
|
||||||
##### How might we be able to reproduce the error?
|
<!--- How can we reproduce the error? -->
|
||||||
|
|
||||||
_____
|
_____
|
||||||
|
|
||||||
### Relevant Code:
|
### Relevant Code:
|
||||||
|
|
||||||
```
|
```
|
||||||
// place code here
|
// place a code sample here
|
||||||
```
|
```
|
||||||
|
7
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
7
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<!--- Thank you for contributing to Laradock -->
|
||||||
|
|
||||||
|
##### I completed the 3 steps below:
|
||||||
|
|
||||||
|
- [] I've read the [Contribution Guide](http://laradock.io/contributing).
|
||||||
|
- [] I've updated the **documentation**. (refer to [this](http://laradock.io/contributing/#update-the-documentation-site) for how to do so).
|
||||||
|
- [] I enjoyed my time contributing and making developer's life easier :)
|
0
README-zh.md → .github/README-zh.md
vendored
0
README-zh.md → .github/README-zh.md
vendored
2
README.md → .github/README.md
vendored
2
README.md → .github/README.md
vendored
@ -25,6 +25,8 @@ A Docker PHP development environment that facilitates running **PHP** Apps on **
|
|||||||
- [Winfried van Loon](https://github.com/winfried-van-loon) @winfried-van-loon
|
- [Winfried van Loon](https://github.com/winfried-van-loon) @winfried-van-loon
|
||||||
- [TJ Miller](https://github.com/sixlive) @sixlive
|
- [TJ Miller](https://github.com/sixlive) @sixlive
|
||||||
- [Yu-Lung Shao (Allen)](https://github.com/bestlong) @bestlong
|
- [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.
|
- Join Us.
|
||||||
|
|
||||||
## License
|
## License
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,4 +2,5 @@
|
|||||||
/logs
|
/logs
|
||||||
/data
|
/data
|
||||||
.env
|
.env
|
||||||
/.project
|
/.project
|
||||||
|
.docker-sync
|
@ -41,8 +41,11 @@ env:
|
|||||||
|
|
||||||
# Installing a newer Docker version
|
# Installing a newer Docker version
|
||||||
before_install:
|
before_install:
|
||||||
|
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||||
|
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
||||||
- sudo apt-get update
|
- sudo apt-get update
|
||||||
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-engine
|
- sudo apt-get -y install docker-ce
|
||||||
|
- docker version
|
||||||
|
|
||||||
script: ./travis-build.sh
|
script: ./travis-build.sh
|
||||||
|
|
||||||
|
@ -156,21 +156,81 @@ You might use the `--no-cache` option if you want full rebuilding (`docker-compo
|
|||||||
<br>
|
<br>
|
||||||
<a name="Docker-Sync"></a>
|
<a name="Docker-Sync"></a>
|
||||||
|
|
||||||
## Docker-Sync
|
## 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.
|
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.
|
||||||
|
|
||||||
The problem originates in bind-mount performance on MacOS. Docker for Mac uses osxfs by default. This is not without reason, it has [a lot of advantages](https://docs.docker.com/docker-for-mac/osxfs/).
|
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.
|
||||||
|
|
||||||
Solutions to resolve this issue are easily installed however, we're hoping it'll be fixed by Docker themselves over time. They are currently [adding "cached and delegated" options](https://github.com/docker/for-mac/issues/77#issuecomment-283996750), which is partly available for Docker Edge.
|
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`
|
||||||
|
|
||||||
Options are [to switch over to NFS](https://github.com/IFSight/d4m-nfs) which is the simplest. The fastest option is [Docker-Sync "native"](https://github.com/EugenMayer/docker-sync) which is still quite easy to install.
|
#### Usage
|
||||||
|
|
||||||
Clone [this repo](https://github.com/EugenMayer/docker-sync-boilerplate) to your machine, copy `default/docker-sync.yml` to your Laradock directory and run `docker-sync-stack start`. Be sure to use `docker-sync-stack clean` to stop and `docker-compose build` to rebuild. More information can be found [in the Docker-sync docs](https://github.com/EugenMayer/docker-sync).
|
Laradock comes with `sync.sh`, an optional bash script, that automates installing, running and stopping docker-sync. Note that to run the bash script you may need to change the permissions `chmod 755 sync.sh`
|
||||||
|
|
||||||
|
1) Configure your Laradock environment as you would normally do and test your application to make sure that your sites are running correctly.
|
||||||
|
|
||||||
|
2) Make sure to set `DOCKER_SYNC_STRATEGY` on the `.env`. Read the [syncing strategies](https://github.com/EugenMayer/docker-sync/wiki/8.-Strategies) for details.
|
||||||
|
```
|
||||||
|
# osx: 'native_osx' (default)
|
||||||
|
# windows: 'unison'
|
||||||
|
# linux: docker-sync not required
|
||||||
|
|
||||||
|
DOCKER_SYNC_STRATEGY=native_osx
|
||||||
|
```
|
||||||
|
|
||||||
|
2) Install the docker-sync gem on the host-machine:
|
||||||
|
```bash
|
||||||
|
./sync.sh install
|
||||||
|
```
|
||||||
|
3) Start docker-sync and the Laradock environment.
|
||||||
|
Specify the services you want to run, as you would normally do with `docker-compose up`
|
||||||
|
```bash
|
||||||
|
./sync.sh up nginx mysql
|
||||||
|
```
|
||||||
|
Please note that the first time docker-sync runs, it will copy all the files to the intermediate container and that may take a very long time (15min+).
|
||||||
|
4) To stop the environment and docker-sync do:
|
||||||
|
```bash
|
||||||
|
./sync.sh down
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Setting up Aliases (optional)
|
||||||
|
|
||||||
|
You may create bash profile aliases to avoid having to remember and type these commands for everyday development.
|
||||||
|
Add the following lines to your `~/.bash_profile`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
alias devup="cd /PATH_TO_LARADOCK/laradock; ./sync.sh up nginx mysql" #add your services
|
||||||
|
alias devbash="cd /PATH_TO_LARADOCK/laradock; ./sync.sh bash"
|
||||||
|
alias devdown="cd /PATH_TO_LARADOCK/laradock; ./sync.sh down"
|
||||||
|
```
|
||||||
|
|
||||||
|
Now from any location on your machine, you can simply run `devup`, `devbash` and `devdown`.
|
||||||
|
|
||||||
|
|
||||||
|
#### Additional Commands
|
||||||
|
|
||||||
|
Opening bash on the workspace container (to run artisan for example):
|
||||||
|
```bash
|
||||||
|
./sync.sh bash
|
||||||
|
```
|
||||||
|
Manually triggering the synchronization of the files:
|
||||||
|
```bash
|
||||||
|
./sync.sh sync
|
||||||
|
```
|
||||||
|
Removing and cleaning up the files and the docker-sync container. Use only if you want to rebuild or remove docker-sync completely. The files on the host will be kept untouched.
|
||||||
|
```bash
|
||||||
|
./sync.sh clean
|
||||||
|
```
|
||||||
|
|
||||||
|
**Additional Notes:**
|
||||||
|
|
||||||
|
- You may run laradock with or without docker-sync at any time using with the same `.env` and `docker-compose.yml`, because the configuration is overridden automatically when docker-sync is used.
|
||||||
|
- You may inspect the `sync.sh` script to learn each of the commands and even add custom ones.
|
||||||
|
- If a container cannot access the files on docker-sync, you may need to set a user on the Dockerfile of that container with an id of 1000 (this is the UID that nginx and php-fpm have configured on laradock). Alternatively, you may change the permissions to 777, but this is **not** recommended.
|
||||||
|
|
||||||
|
Visit the [docker-sync documentation](https://github.com/EugenMayer/docker-sync/wiki) for more details.
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="Add-Docker-Images"></a>
|
<a name="Add-Docker-Images"></a>
|
||||||
@ -192,14 +252,17 @@ The NGINX Log file is stored in the `logs/nginx` directory.
|
|||||||
However to view the logs of all the other containers (MySQL, PHP-FPM,...) you can run this:
|
However to view the logs of all the other containers (MySQL, PHP-FPM,...) you can run this:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker logs {container-name}
|
docker-compose logs {container-name}
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose logs -f {container-name}
|
||||||
```
|
```
|
||||||
|
|
||||||
More [options](https://docs.docker.com/compose/reference/logs/)
|
More [options](https://docs.docker.com/compose/reference/logs/)
|
||||||
|
|
||||||
```bash
|
|
||||||
docker logs -f {container-name}
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -330,9 +393,7 @@ It should be like this:
|
|||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
2 - Re-build the containers `docker-compose build workspace php-fpm`
|
2 - Open `laradock/workspace/xdebug.ini` and `laradock/php-fpm/xdebug.ini` and enable at least the following configurations:
|
||||||
|
|
||||||
3 - Open `laradock/workspace/xdebug.ini` and/or `laradock/php-fpm/xdebug.ini` and enable at least the following configurations:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
xdebug.remote_autostart=1
|
xdebug.remote_autostart=1
|
||||||
@ -340,11 +401,25 @@ xdebug.remote_enable=1
|
|||||||
xdebug.remote_connect_back=1
|
xdebug.remote_connect_back=1
|
||||||
```
|
```
|
||||||
|
|
||||||
For information on how to configure xDebug with your IDE and work it out, check this [Repository](https://github.com/LarryEitel/laravel-laradock-phpstorm).
|
3 - Re-build the containers `docker-compose build workspace php-fpm`
|
||||||
|
|
||||||
|
For information on how to configure xDebug with your IDE and work it out, check this [Repository](https://github.com/LarryEitel/laravel-laradock-phpstorm) or follow up on the next section if you use linux and PhpStorm.
|
||||||
|
|
||||||
|
|
||||||
|
<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 Xdebug accepts connections and listens on port 9000. (Should be default configuration).
|
||||||
|
|
||||||
|
.
|
||||||
|
|
||||||
|
- Create a server with name `laradock` (matches **PHP_IDE_CONFIG** key in environment file) and make sure to map project root path with server correctly.
|
||||||
|
|
||||||
|
.
|
||||||
|
|
||||||
|
- Start listening for debug connections, place a breakpoint and you are good to go !
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@ -734,7 +809,7 @@ docker-compose up -d mariadb phpmyadmin
|
|||||||
1 - Run the Adminer Container (`adminer`) with the `docker-compose up` command. Example:
|
1 - Run the Adminer Container (`adminer`) with the `docker-compose up` command. Example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose up -d adminer
|
docker-compose up -d adminer
|
||||||
```
|
```
|
||||||
|
|
||||||
2 - Open your browser and visit the localhost on port **8080**: `http://localhost:8080`
|
2 - Open your browser and visit the localhost on port **8080**: `http://localhost:8080`
|
||||||
@ -1023,6 +1098,26 @@ To change the default forwarded port for ssh:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Change-the-MySQL-Version"></a>
|
||||||
|
## Change the (MySQL) Version
|
||||||
|
By default **MySQL 8.0** is running.
|
||||||
|
|
||||||
|
MySQL 8.0 is a development release. You may prefer to use the latest stable version, or an even older release. If you wish, you can change the MySQL image that is used.
|
||||||
|
|
||||||
|
Open up your .env file and set the `MYSQL_VERSION` variable to the version you would like to install.
|
||||||
|
|
||||||
|
```
|
||||||
|
MYSQL_VERSION=5.7
|
||||||
|
```
|
||||||
|
|
||||||
|
Available versions are: 5.5, 5.6, 5.7, 8.0, or latest. See https://store.docker.com/images/mysql for more information.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="MySQL-access-from-host"></a>
|
<a name="MySQL-access-from-host"></a>
|
||||||
## MySQL access from host
|
## MySQL access from host
|
||||||
@ -1057,6 +1152,19 @@ The default username and password for the root MySQL user are `root` and `root `
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Create-Multiple-Databases"></a>
|
||||||
|
## Create Multiple Databases (MySQL)
|
||||||
|
|
||||||
|
Create `createdb.sql` from `mysql/docker-entrypoint-initdb.d/createdb.sql.example` in `mysql/docker-entrypoint-initdb.d/*` and add your SQL syntax as follow:
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE DATABASE IF NOT EXISTS `your_db_1` COLLATE 'utf8_general_ci' ;
|
||||||
|
GRANT ALL ON `your_db_1`.* TO 'mysql_user'@'%' ;
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="Change-MySQL-port"></a>
|
<a name="Change-MySQL-port"></a>
|
||||||
|
@ -83,17 +83,21 @@ In adhering to the separation of concerns principle as promoted by Docker, Larad
|
|||||||
You can turn On/Off as many instances of as any container without worrying about the configurations, everything works like a charm.
|
You can turn On/Off as many instances of as any container without worrying about the configurations, everything works like a charm.
|
||||||
|
|
||||||
- **Database Engines:**
|
- **Database Engines:**
|
||||||
MySQL - MariaDB - Percona - MongoDB - Neo4j - RethinkDB - MSSQL - PostgreSQL - Postgres Postgis.
|
MySQL - MariaDB - Percona - MongoDB - Neo4j - RethinkDB - MSSQL - PostgreSQL - Postgres-PostGIS.
|
||||||
|
- **Database Management:**
|
||||||
|
PhpMyAdmin - Adminer - PgAdmin
|
||||||
- **Cache Engines:**
|
- **Cache Engines:**
|
||||||
Redis - Memcached - Aerospike
|
Redis - Memcached - Aerospike
|
||||||
- **PHP Servers:**
|
- **PHP Servers:**
|
||||||
NGINX - Apache2 - Caddy
|
NGINX - Apache2 - Caddy
|
||||||
- **PHP Compilers:**
|
- **PHP Compilers:**
|
||||||
PHP FPM - HHVM
|
PHP FPM - HHVM
|
||||||
- **Message Queuing:**
|
- **Message Queueing:**
|
||||||
Beanstalkd - Beanstalkd Console - RabbitMQ - RabbitMQ Console - PHP Worker
|
Beanstalkd - RabbitMQ - PHP Worker
|
||||||
- **Tools:**
|
- **Queueing Management:**
|
||||||
HAProxy - Jenkins - ElasticSearch - Selenium - Certbot - Mailhog - Minio - Varnish - PhpMyAdmin - Adminer - PgAdmin - MailHog - [Blackfire](https://blackfire.io)...
|
Beanstalkd Console - RabbitMQ Console
|
||||||
|
- **Random Tools:**
|
||||||
|
HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Mailhog - Minio - Varnish - Swoole - Laravel Echo...
|
||||||
|
|
||||||
Laradock introduces the **Workspace** Image, as a development environment.
|
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.
|
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.
|
||||||
@ -148,7 +152,7 @@ Most importantly Docker can run on Development and on Production (same environme
|
|||||||
|
|
||||||
What's better than a **Demo Video**:
|
What's better than a **Demo Video**:
|
||||||
|
|
||||||
- Laradock v5.* (soon or never)
|
- Laradock v5.* (should be next!)
|
||||||
- Laradock [v4.*](https://www.youtube.com/watch?v=TQii1jDa96Y)
|
- Laradock [v4.*](https://www.youtube.com/watch?v=TQii1jDa96Y)
|
||||||
- Laradock [v2.*](https://www.youtube.com/watch?v=-DamFMczwDA)
|
- Laradock [v2.*](https://www.youtube.com/watch?v=-DamFMczwDA)
|
||||||
- Laradock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
|
- Laradock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
@ -2,17 +2,18 @@ FROM alpine:3.4
|
|||||||
|
|
||||||
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
|
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
|
||||||
|
|
||||||
ENV caddy_version=0.10.0
|
ENV caddy_version=0.10.3
|
||||||
|
ARG plugins=http.git
|
||||||
|
|
||||||
LABEL caddy_version="$caddy_version" architecture="amd64"
|
LABEL caddy_version="$caddy_version" architecture="amd64"
|
||||||
|
|
||||||
RUN apk update \
|
RUN apk update \
|
||||||
&& apk upgrade \
|
&& apk upgrade \
|
||||||
&& apk add tar curl git
|
&& apk add tar curl git openssh
|
||||||
|
|
||||||
RUN curl --silent --show-error --fail --location \
|
RUN curl --silent --show-error --fail --location \
|
||||||
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
|
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
|
||||||
"https://caddyserver.com/download/linux/amd64?plugins=http.cgi,http.cors,http.expires,http.filemanager,http.git,http.ipfilter,http.realip,tls.dns.cloudflare,tls.dns.digitalocean,tls.dns.dnspod,tls.dns.dyn,tls.dns.googlecloud,tls.dns.linode,tls.dns.namecheap,tls.dns.ovh,tls.dns.route53,tls.dns.vultr" \
|
"https://caddyserver.com/download/linux/amd64?plugins=${plugins}" \
|
||||||
| tar --no-same-owner -C /usr/bin/ -xz caddy \
|
| tar --no-same-owner -C /usr/bin/ -xz caddy \
|
||||||
&& mv /usr/bin/caddy /usr/bin/caddy \
|
&& mv /usr/bin/caddy /usr/bin/caddy \
|
||||||
&& chmod 0755 /usr/bin/caddy
|
&& chmod 0755 /usr/bin/caddy
|
||||||
|
17
docker-compose.sync.yml
Normal file
17
docker-compose.sync.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
version: '2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
### Applications Code Container #############################
|
||||||
|
|
||||||
|
applications:
|
||||||
|
image: tianon/true
|
||||||
|
volumes:
|
||||||
|
- applications-sync:/var/www:nocopy # nocopy is required
|
||||||
|
|
||||||
|
### Volumes Setup #############################################
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
applications-sync:
|
||||||
|
external:
|
||||||
|
name: "applications-docker-sync"
|
@ -32,6 +32,7 @@ services:
|
|||||||
- INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER}
|
- INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER}
|
||||||
- INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LINUXBREW}
|
- INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LINUXBREW}
|
||||||
- INSTALL_MC=${WORKSPACE_INSTALL_MC}
|
- INSTALL_MC=${WORKSPACE_INSTALL_MC}
|
||||||
|
- INSTALL_IMAGE_OPTIMIZERS=${WORKSPACE_INSTALL_IMAGE_OPTIMIZERS}
|
||||||
- PUID=${WORKSPACE_PUID}
|
- PUID=${WORKSPACE_PUID}
|
||||||
- PGID=${WORKSPACE_PGID}
|
- PGID=${WORKSPACE_PGID}
|
||||||
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
|
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
|
||||||
@ -75,6 +76,7 @@ services:
|
|||||||
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}
|
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}
|
||||||
- INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP}
|
- INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP}
|
||||||
- INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE}
|
- INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE}
|
||||||
|
- INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS}
|
||||||
dockerfile: "Dockerfile-${PHP_VERSION}"
|
dockerfile: "Dockerfile-${PHP_VERSION}"
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- applications
|
- applications
|
||||||
@ -149,7 +151,7 @@ services:
|
|||||||
- applications
|
- applications
|
||||||
volumes:
|
volumes:
|
||||||
- ${APACHE_HOST_LOG_PATH}:/var/log/apache2
|
- ${APACHE_HOST_LOG_PATH}:/var/log/apache2
|
||||||
- ./apache2/sites:/etc/apache2/sites-available
|
- ${APACHE_SITES_PATH}:/etc/apache2/sites-available
|
||||||
ports:
|
ports:
|
||||||
- "${APACHE_HOST_HTTP_PORT}:80"
|
- "${APACHE_HOST_HTTP_PORT}:80"
|
||||||
- "${APACHE_HOST_HTTPS_PORT}:443"
|
- "${APACHE_HOST_HTTPS_PORT}:443"
|
||||||
@ -192,14 +194,17 @@ services:
|
|||||||
mysql:
|
mysql:
|
||||||
build:
|
build:
|
||||||
context: ./mysql
|
context: ./mysql
|
||||||
|
args:
|
||||||
|
- MYSQL_VERSION=${MYSQL_VERSION}
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||||
- MYSQL_USER=${MYSQL_USER}
|
- MYSQL_USER=${MYSQL_USER}
|
||||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||||
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
||||||
|
- TZ=${WORKSPACE_TIMEZONE}
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_SAVE_PATH}/mysql:/var/lib/mysql
|
- ${DATA_SAVE_PATH}/mysql:/var/lib/mysql
|
||||||
- ./mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
|
- ${MYSQL_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
|
||||||
ports:
|
ports:
|
||||||
- "${MYSQL_PORT}:3306"
|
- "${MYSQL_PORT}:3306"
|
||||||
networks:
|
networks:
|
||||||
@ -217,7 +222,7 @@ services:
|
|||||||
- MYSQL_ROOT_PASSWORD=${PERCONA_ROOT_PASSWORD}
|
- MYSQL_ROOT_PASSWORD=${PERCONA_ROOT_PASSWORD}
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_SAVE_PATH}/percona:/var/lib/mysql
|
- ${DATA_SAVE_PATH}/percona:/var/lib/mysql
|
||||||
- ./percona/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
|
- ${PERCONA_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
|
||||||
ports:
|
ports:
|
||||||
- "${PERCONA_PORT}:3306"
|
- "${PERCONA_PORT}:3306"
|
||||||
networks:
|
networks:
|
||||||
@ -245,7 +250,7 @@ services:
|
|||||||
build: ./mariadb
|
build: ./mariadb
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_SAVE_PATH}/mariadb:/var/lib/mysql
|
- ${DATA_SAVE_PATH}/mariadb:/var/lib/mysql
|
||||||
- ./mariadb/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
|
- ${MARIADB_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
|
||||||
ports:
|
ports:
|
||||||
- "${MARIADB_PORT}:3306"
|
- "${MARIADB_PORT}:3306"
|
||||||
environment:
|
environment:
|
||||||
@ -472,6 +477,15 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- elasticsearch-data:/usr/share/elasticsearch/data
|
- elasticsearch-data:/usr/share/elasticsearch/data
|
||||||
- elasticsearch-plugins:/usr/share/elasticsearch/plugins
|
- elasticsearch-plugins:/usr/share/elasticsearch/plugins
|
||||||
|
environment:
|
||||||
|
- cluster.name=laradock-cluster
|
||||||
|
- bootstrap.memory_lock=true
|
||||||
|
- "ES_JAVA_OPTS=-Xms256m -Xmx256m"
|
||||||
|
ulimits:
|
||||||
|
memlock:
|
||||||
|
soft: -1
|
||||||
|
hard: -1
|
||||||
|
mem_limit: 512m
|
||||||
ports:
|
ports:
|
||||||
- "${ELASTICSEARCH_HOST_HTTP_PORT}:9200"
|
- "${ELASTICSEARCH_HOST_HTTP_PORT}:9200"
|
||||||
- "${ELASTICSEARCH_HOST_TRANSPORT_PORT}:9300"
|
- "${ELASTICSEARCH_HOST_TRANSPORT_PORT}:9300"
|
||||||
@ -481,6 +495,19 @@ services:
|
|||||||
- frontend
|
- frontend
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
|
|
||||||
|
### Kibana Container #######################################
|
||||||
|
|
||||||
|
kibana:
|
||||||
|
build: ./kibana
|
||||||
|
ports:
|
||||||
|
- "${KIBANA_HTTP_PORT}:5601"
|
||||||
|
depends_on:
|
||||||
|
- elasticsearch
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
|
|
||||||
### Certbot Container ##################################
|
### Certbot Container ##################################
|
||||||
|
|
||||||
certbot:
|
certbot:
|
||||||
@ -504,6 +531,7 @@ services:
|
|||||||
- "8025:8025"
|
- "8025:8025"
|
||||||
networks:
|
networks:
|
||||||
- frontend
|
- frontend
|
||||||
|
- backend
|
||||||
|
|
||||||
### Selenium Container ########################################
|
### Selenium Container ########################################
|
||||||
|
|
||||||
@ -567,6 +595,7 @@ services:
|
|||||||
- proxy2
|
- proxy2
|
||||||
|
|
||||||
### Jenkins ###################################################
|
### Jenkins ###################################################
|
||||||
|
|
||||||
jenkins:
|
jenkins:
|
||||||
build: ./jenkins
|
build: ./jenkins
|
||||||
environment:
|
environment:
|
||||||
@ -582,6 +611,19 @@ services:
|
|||||||
- frontend
|
- frontend
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
|
### Laravel Echo Server #######################################
|
||||||
|
laravel-echo-server:
|
||||||
|
build:
|
||||||
|
context: ./laravel-echo-server
|
||||||
|
volumes:
|
||||||
|
- ./laravel-echo-server/laravel-echo-server.json:/app/laravel-echo-server.json:ro
|
||||||
|
ports:
|
||||||
|
- "${LARAVEL_ECHO_SERVER_PORT}:6001"
|
||||||
|
links:
|
||||||
|
- redis
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
|
|
||||||
### Networks Setup ############################################
|
### Networks Setup ############################################
|
||||||
|
|
||||||
|
13
docker-sync.yml
Normal file
13
docker-sync.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
version: "2"
|
||||||
|
|
||||||
|
options:
|
||||||
|
verbose: true
|
||||||
|
syncs:
|
||||||
|
applications-docker-sync: # name of the intermediary sync volume
|
||||||
|
compose-dev-file-path: 'docker-compose.sync.yml' # docker-compose override file
|
||||||
|
|
||||||
|
src: '${APPLICATION}' # host source directory
|
||||||
|
sync_userid: 1000 # giving permissions to www-data user (as defined in nginx and php-fpm Dockerfiles)
|
||||||
|
sync_strategy: '${DOCKER_SYNC_STRATEGY}' # for osx use 'native_osx', for windows use 'unison'
|
||||||
|
|
||||||
|
sync_excludes: ['laradock', 'ignored_folder_example'] # ignored directories
|
@ -1,5 +1,3 @@
|
|||||||
FROM elasticsearch:latest
|
FROM docker.elastic.co/elasticsearch/elasticsearch:5.4.1
|
||||||
|
|
||||||
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
|
|
||||||
|
|
||||||
EXPOSE 9200 9300
|
EXPOSE 9200 9300
|
||||||
|
25
env-example
25
env-example
@ -45,6 +45,7 @@ WORKSPACE_INSTALL_LARAVEL_INSTALLER=false
|
|||||||
WORKSPACE_INSTALL_DEPLOYER=false
|
WORKSPACE_INSTALL_DEPLOYER=false
|
||||||
WORKSPACE_INSTALL_LINUXBREW=false
|
WORKSPACE_INSTALL_LINUXBREW=false
|
||||||
WORKSPACE_INSTALL_MC=false
|
WORKSPACE_INSTALL_MC=false
|
||||||
|
WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false
|
||||||
WORKSPACE_PUID=1000
|
WORKSPACE_PUID=1000
|
||||||
WORKSPACE_PGID=1000
|
WORKSPACE_PGID=1000
|
||||||
WORKSPACE_NODE_VERSION=stable
|
WORKSPACE_NODE_VERSION=stable
|
||||||
@ -71,6 +72,7 @@ PHP_FPM_INSTALL_INTL=false
|
|||||||
PHP_FPM_INSTALL_GHOSTSCRIPT=false
|
PHP_FPM_INSTALL_GHOSTSCRIPT=false
|
||||||
PHP_FPM_INSTALL_LDAP=false
|
PHP_FPM_INSTALL_LDAP=false
|
||||||
PHP_FPM_INSTALL_SWOOLE=false
|
PHP_FPM_INSTALL_SWOOLE=false
|
||||||
|
PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=false
|
||||||
|
|
||||||
### NGINX ##############################################################################################################
|
### NGINX ##############################################################################################################
|
||||||
|
|
||||||
@ -85,15 +87,18 @@ APACHE_HOST_HTTP_PORT=80
|
|||||||
APACHE_HOST_HTTPS_PORT=443
|
APACHE_HOST_HTTPS_PORT=443
|
||||||
APACHE2_PHP_SOCKET=php-fpm:9000
|
APACHE2_PHP_SOCKET=php-fpm:9000
|
||||||
APACHE_HOST_LOG_PATH=./logs/apache2
|
APACHE_HOST_LOG_PATH=./logs/apache2
|
||||||
|
APACHE_SITES_PATH=./apache2/sites
|
||||||
PHP_SOCKET=php-fpm:9000
|
PHP_SOCKET=php-fpm:9000
|
||||||
|
|
||||||
### MYSQL ##############################################################################################################
|
### MYSQL ##############################################################################################################
|
||||||
|
|
||||||
|
MYSQL_VERSION=8.0
|
||||||
MYSQL_DATABASE=default
|
MYSQL_DATABASE=default
|
||||||
MYSQL_USER=default
|
MYSQL_USER=default
|
||||||
MYSQL_PASSWORD=secret
|
MYSQL_PASSWORD=secret
|
||||||
MYSQL_PORT=3306
|
MYSQL_PORT=3306
|
||||||
MYSQL_ROOT_PASSWORD=root
|
MYSQL_ROOT_PASSWORD=root
|
||||||
|
MYSQL_ENTRYPOINT_INITDB=./mysql/docker-entrypoint-initdb.d
|
||||||
|
|
||||||
### Percona ############################################################################################################
|
### Percona ############################################################################################################
|
||||||
|
|
||||||
@ -102,6 +107,7 @@ PERCONA_USER=homestead
|
|||||||
PERCONA_PASSWORD=secret
|
PERCONA_PASSWORD=secret
|
||||||
PERCONA_PORT=3306
|
PERCONA_PORT=3306
|
||||||
PERCONA_ROOT_PASSWORD=root
|
PERCONA_ROOT_PASSWORD=root
|
||||||
|
PERCONA_ENTRYPOINT_INITDB=./percona/docker-entrypoint-initdb.d
|
||||||
|
|
||||||
### MSSQL ##############################################################################################################
|
### MSSQL ##############################################################################################################
|
||||||
|
|
||||||
@ -116,6 +122,7 @@ MARIADB_USER=default
|
|||||||
MARIADB_PASSWORD=secret
|
MARIADB_PASSWORD=secret
|
||||||
MARIADB_PORT=3306
|
MARIADB_PORT=3306
|
||||||
MARIADB_ROOT_PASSWORD=root
|
MARIADB_ROOT_PASSWORD=root
|
||||||
|
MARIADB_ENTRYPOINT_INITDB=./mariadb/docker-entrypoint-initdb.d
|
||||||
|
|
||||||
### POSTGRES ###########################################################################################################
|
### POSTGRES ###########################################################################################################
|
||||||
|
|
||||||
@ -137,6 +144,10 @@ RABBITMQ_DEFAULT_PASS=guest
|
|||||||
ELASTICSEARCH_HOST_HTTP_PORT=9200
|
ELASTICSEARCH_HOST_HTTP_PORT=9200
|
||||||
ELASTICSEARCH_HOST_TRANSPORT_PORT=9300
|
ELASTICSEARCH_HOST_TRANSPORT_PORT=9300
|
||||||
|
|
||||||
|
### KIBANA #############################################################################################################
|
||||||
|
|
||||||
|
KIBANA_HTTP_PORT=5601
|
||||||
|
|
||||||
### MEMCACHED ##########################################################################################################
|
### MEMCACHED ##########################################################################################################
|
||||||
|
|
||||||
MEMCACHED_HOST_PORT=11211
|
MEMCACHED_HOST_PORT=11211
|
||||||
@ -241,6 +252,17 @@ CADDY_HOST_HTTPS_PORT=443
|
|||||||
CADDY_HOST_LOG_PATH=./logs/caddy
|
CADDY_HOST_LOG_PATH=./logs/caddy
|
||||||
CADDY_CUSTOM_CADDYFILE=./caddy/Caddyfile
|
CADDY_CUSTOM_CADDYFILE=./caddy/Caddyfile
|
||||||
|
|
||||||
|
### LARAVEL ECHO SERVER ################################################################################################
|
||||||
|
|
||||||
|
LARAVEL_ECHO_SERVER_PORT=6001
|
||||||
|
|
||||||
|
### DOCKER-SYNC ################################################################################################
|
||||||
|
|
||||||
|
# osx: 'native_osx' (default)
|
||||||
|
# windows: 'unison'
|
||||||
|
# linux: docker-sync not required
|
||||||
|
|
||||||
|
DOCKER_SYNC_STRATEGY=native_osx
|
||||||
|
|
||||||
##### TO BE CONTINUE .................................
|
##### TO BE CONTINUE .................................
|
||||||
|
|
||||||
@ -248,8 +270,6 @@ CADDY_CUSTOM_CADDYFILE=./caddy/Caddyfile
|
|||||||
# .........
|
# .........
|
||||||
# .........
|
# .........
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# Miscellaneous
|
# Miscellaneous
|
||||||
############################
|
############################
|
||||||
@ -267,3 +287,4 @@ PHP_IDE_CONFIG=serverName=laradock
|
|||||||
# Fix for windows users to make sure the application path works.
|
# Fix for windows users to make sure the application path works.
|
||||||
|
|
||||||
COMPOSE_CONVERT_WINDOWS_PATHS=1
|
COMPOSE_CONVERT_WINDOWS_PATHS=1
|
||||||
|
|
||||||
|
3
kibana/Dockerfile
Normal file
3
kibana/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
FROM docker.elastic.co/kibana/kibana:5.4.1
|
||||||
|
|
||||||
|
EXPOSE 5601
|
15
laravel-echo-server/Dockerfile
Normal file
15
laravel-echo-server/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
FROM node:argon
|
||||||
|
|
||||||
|
# Create app directory
|
||||||
|
RUN mkdir -p /usr/src/app
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
# Install app dependencies
|
||||||
|
COPY package.json /usr/src/app/
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Bundle app source
|
||||||
|
COPY laravel-echo-server.json /usr/src/app/laravel-echo-server.json
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
CMD [ "npm", "start" ]
|
19
laravel-echo-server/laravel-echo-server.json
Normal file
19
laravel-echo-server/laravel-echo-server.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"authHost": "localhost",
|
||||||
|
"authEndpoint": "/broadcasting/auth",
|
||||||
|
"clients": [],
|
||||||
|
"database": "redis",
|
||||||
|
"databaseConfig": {
|
||||||
|
"redis": {
|
||||||
|
"port": "6379",
|
||||||
|
"host": "redis"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"devMode": true,
|
||||||
|
"host": null,
|
||||||
|
"port": "6001",
|
||||||
|
"protocol": "http",
|
||||||
|
"socketio": {},
|
||||||
|
"sslCertPath": "",
|
||||||
|
"sslKeyPath": ""
|
||||||
|
}
|
12
laravel-echo-server/package.json
Normal file
12
laravel-echo-server/package.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "laravel-echo-server-docker",
|
||||||
|
"description": "Docker container for running laravel-echo-server",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"laravel-echo-server": "^1.2.8"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"start": "laravel-echo-server start"
|
||||||
|
}
|
||||||
|
}
|
@ -1,7 +1,16 @@
|
|||||||
FROM mysql:5.7
|
ARG MYSQL_VERSION=8.0
|
||||||
|
FROM mysql:${MYSQL_VERSION}
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Set Timezone
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG TZ=UTC
|
||||||
|
ENV TZ ${TZ}
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
RUN chown -R mysql:root /var/lib/mysql/
|
RUN chown -R mysql:root /var/lib/mysql/
|
||||||
|
|
||||||
ADD my.cnf /etc/mysql/conf.d/my.cnf
|
ADD my.cnf /etc/mysql/conf.d/my.cnf
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
###
|
#
|
||||||
### Copy createdb.sql.example to createdb.sql
|
# Copy createdb.sql.example to createdb.sql
|
||||||
### then uncomment then set database name and username to create you need databases
|
# then uncomment then set database name and username to create you need databases
|
||||||
#
|
#
|
||||||
# example: .env MYSQL_USER=appuser and need db name is myshop_db
|
# example: .env MYSQL_USER=appuser and need db name is myshop_db
|
||||||
#
|
#
|
||||||
# CREATE DATABASE IF NOT EXISTS `myshop_db` ;
|
# CREATE DATABASE IF NOT EXISTS `myshop_db` ;
|
||||||
# GRANT ALL ON `myshop_db`.* TO 'appuser'@'%' ;
|
# GRANT ALL ON `myshop_db`.* TO 'appuser'@'%' ;
|
||||||
#
|
#
|
||||||
###
|
#
|
||||||
### this sql script is auto run when mysql container start and $DATA_SAVE_PATH/mysql not exists.
|
# this sql script will auto run when the mysql container starts and the $DATA_SAVE_PATH/mysql not found.
|
||||||
###
|
#
|
||||||
### if your $DATA_SAVE_PATH/mysql is exists and you do not want to delete it, you can run by manual execution:
|
# if your $DATA_SAVE_PATH/mysql exists and you do not want to delete it, you can run by manual execution:
|
||||||
###
|
#
|
||||||
### docker-compose exec mysql bash
|
# docker-compose exec mysql bash
|
||||||
### mysql -u root -p < /docker-entrypoint-initdb.d/createdb.sql
|
# mysql -u root -p < /docker-entrypoint-initdb.d/createdb.sql
|
||||||
###
|
#
|
||||||
|
|
||||||
#CREATE DATABASE IF NOT EXISTS `dev_db_1` COLLATE 'utf8_general_ci' ;
|
#CREATE DATABASE IF NOT EXISTS `dev_db_1` COLLATE 'utf8_general_ci' ;
|
||||||
#GRANT ALL ON `dev_db_1`.* TO 'default'@'%' ;
|
#GRANT ALL ON `dev_db_1`.* TO 'default'@'%' ;
|
||||||
|
@ -7,3 +7,4 @@
|
|||||||
|
|
||||||
[mysqld]
|
[mysqld]
|
||||||
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
|
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
|
||||||
|
character-set-server=utf8
|
||||||
|
@ -28,7 +28,7 @@ http {
|
|||||||
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
|
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
include /etc/nginx/sites-available/*;
|
include /etc/nginx/sites-available/*.conf;
|
||||||
open_file_cache off; # Disabled for issue 619
|
open_file_cache off; # Disabled for issue 619
|
||||||
charset UTF-8;
|
charset UTF-8;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM fenglc/pgadmin4
|
FROM chorss/docker-pgadmin4
|
||||||
|
|
||||||
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
|
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
|
||||||
|
|
||||||
|
@ -246,6 +246,29 @@ RUN if [ ${INSTALL_LDAP} = true ]; then \
|
|||||||
docker-php-ext-install ldap \
|
docker-php-ext-install ldap \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# SQL SERVER:
|
||||||
|
#####################################
|
||||||
|
ARG INSTALL_MSSQL=false
|
||||||
|
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
||||||
|
apt-get -y install php5-sybase freetds-bin && \
|
||||||
|
cp /usr/lib/php5/20131226/*.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ && \
|
||||||
|
docker-php-ext-enable mssql pdo pdo_dblib \
|
||||||
|
;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 update -yqq && \
|
||||||
|
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
|
||||||
|
;fi
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Final Touch
|
# Final Touch
|
||||||
|
@ -282,6 +282,17 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
|||||||
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
|
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
|
||||||
;fi
|
;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 update -yqq && \
|
||||||
|
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
|
||||||
|
;fi
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Final Touch
|
# Final Touch
|
||||||
|
@ -289,6 +289,17 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
|||||||
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
|
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
|
||||||
;fi
|
;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 update -yqq && \
|
||||||
|
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
|
||||||
|
;fi
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Final Touch
|
# Final Touch
|
||||||
|
89
sync.sh
Executable file
89
sync.sh
Executable file
@ -0,0 +1,89 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This shell script is an optional tool to simplify
|
||||||
|
# the installation and usage of laradock with docker-sync.
|
||||||
|
|
||||||
|
# Make sure that the DOCKER_SYNC_STRATEGY is set in the .env
|
||||||
|
# DOCKER_SYNC_STRATEGY=native_osx # osx
|
||||||
|
# DOCKER_SYNC_STRATEGY=unison # windows
|
||||||
|
|
||||||
|
# To run, make sure to add permissions to this file:
|
||||||
|
# chmod 755 sync.sh
|
||||||
|
|
||||||
|
# USAGE EXAMPLE:
|
||||||
|
# Install docker-sync: ./sync.sh install
|
||||||
|
# Start sync and services with nginx and mysql: ./sync.sh up nginx mysql
|
||||||
|
# Stop containers and sync: ./sync.sh down
|
||||||
|
|
||||||
|
# prints colored text
|
||||||
|
print_style () {
|
||||||
|
|
||||||
|
if [ "$2" == "info" ] ; then
|
||||||
|
COLOR="96m"
|
||||||
|
elif [ "$2" == "success" ] ; then
|
||||||
|
COLOR="92m"
|
||||||
|
elif [ "$2" == "warning" ] ; then
|
||||||
|
COLOR="93m"
|
||||||
|
elif [ "$2" == "danger" ] ; then
|
||||||
|
COLOR="91m"
|
||||||
|
else #default color
|
||||||
|
COLOR="0m"
|
||||||
|
fi
|
||||||
|
|
||||||
|
STARTCOLOR="\e[$COLOR"
|
||||||
|
ENDCOLOR="\e[0m"
|
||||||
|
|
||||||
|
printf "$STARTCOLOR%b$ENDCOLOR" "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
display_options () {
|
||||||
|
printf "Available options:\n";
|
||||||
|
print_style " install" "info"; printf "\t\t Installs docker-sync gem on the host machine.\n"
|
||||||
|
print_style " up [services]" "success"; printf "\t Starts docker-sync and runs docker compose.\n"
|
||||||
|
print_style " down" "success"; printf "\t\t\t Stops containers and docker-sync.\n"
|
||||||
|
print_style " bash" "success"; printf "\t\t\t Opens bash on the workspace.\n"
|
||||||
|
print_style " sync" "info"; printf "\t\t\t Manually triggers the synchronization of files.\n"
|
||||||
|
print_style " clean" "danger"; printf "\t\t Removes all files from docker-sync.\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ $# -eq 0 ]] ; then
|
||||||
|
print_style "Missing arguments.\n" "danger"
|
||||||
|
display_options
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" == "up" ] ; then
|
||||||
|
print_style "Initializing Docker Sync\n" "info"
|
||||||
|
print_style "May take a long time (15min+) on the first run\n" "info"
|
||||||
|
docker-sync start;
|
||||||
|
|
||||||
|
print_style "Initializing Docker Compose\n" "info"
|
||||||
|
shift # removing first argument
|
||||||
|
docker-compose -f docker-compose.yml -f docker-compose.sync.yml up -d ${@}
|
||||||
|
|
||||||
|
elif [ "$1" == "down" ]; then
|
||||||
|
print_style "Stopping Docker Compose\n" "info"
|
||||||
|
docker-compose down
|
||||||
|
|
||||||
|
print_style "Stopping Docker Sync\n" "info"
|
||||||
|
docker-sync stop
|
||||||
|
|
||||||
|
elif [ "$1" == "bash" ]; then
|
||||||
|
docker-compose exec workspace bash
|
||||||
|
|
||||||
|
elif [ "$1" == "install" ]; then
|
||||||
|
print_style "Installing docker-sync\n" "info"
|
||||||
|
gem install docker-sync
|
||||||
|
|
||||||
|
elif [ "$1" == "sync" ]; then
|
||||||
|
print_style "Manually triggering sync between host and docker-sync container.\n" "info"
|
||||||
|
docker-sync sync;
|
||||||
|
|
||||||
|
elif [ "$1" == "clean" ]; then
|
||||||
|
print_style "Removing and cleaning up files from the docker-sync container.\n" "warning"
|
||||||
|
docker-sync clean
|
||||||
|
else
|
||||||
|
print_style "Invalid arguments.\n" "danger"
|
||||||
|
display_options
|
||||||
|
exit 1
|
||||||
|
fi
|
@ -117,13 +117,17 @@ COPY ./aliases.sh /home/laradock/aliases.sh
|
|||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
||||||
echo "" >> ~/.bashrc
|
echo "" >> ~/.bashrc && \
|
||||||
|
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||||
|
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
||||||
echo "" >> ~/.bashrc
|
echo "" >> ~/.bashrc && \
|
||||||
|
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||||
|
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# xDebug:
|
# xDebug:
|
||||||
@ -186,7 +190,8 @@ ENV INSTALL_MONGO ${INSTALL_MONGO}
|
|||||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
# Install the mongodb extension
|
# Install the mongodb extension
|
||||||
pecl install mongodb && \
|
pecl install mongodb && \
|
||||||
echo "extension=mongodb.so" >> /etc/php/5.6/cli/conf.d/30-mongodb.ini \
|
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
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
@ -395,6 +400,17 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
|||||||
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
|
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# SQL SERVER:
|
||||||
|
#####################################
|
||||||
|
ARG INSTALL_MSSQL=false
|
||||||
|
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
||||||
|
apt-get -y install php5.6-sybase freetds-bin freetds-common libsybdb5 \
|
||||||
|
&& echo "extension=pdo_dblib.so" > /etc/php/5.6/cli/conf.d/20-pdo_dblib.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Minio:
|
# Minio:
|
||||||
#####################################
|
#####################################
|
||||||
@ -409,6 +425,19 @@ RUN if [ ${INSTALL_MC} = true ]; then\
|
|||||||
chmod +x /usr/local/bin/mc \
|
chmod +x /usr/local/bin/mc \
|
||||||
;fi
|
;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
|
USER laradock
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -117,13 +117,17 @@ COPY ./aliases.sh /home/laradock/aliases.sh
|
|||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
||||||
echo "" >> ~/.bashrc
|
echo "" >> ~/.bashrc && \
|
||||||
|
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||||
|
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
||||||
echo "" >> ~/.bashrc
|
echo "" >> ~/.bashrc && \
|
||||||
|
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||||
|
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# xDebug:
|
# xDebug:
|
||||||
@ -186,7 +190,8 @@ ENV INSTALL_MONGO ${INSTALL_MONGO}
|
|||||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
# Install the mongodb extension
|
# Install the mongodb extension
|
||||||
pecl install mongodb && \
|
pecl install mongodb && \
|
||||||
echo "extension=mongodb.so" >> /etc/php/7.0/cli/conf.d/30-mongodb.ini \
|
echo "extension=mongodb.so" >> /etc/php/7.0/mods-available/mongodb.ini && \
|
||||||
|
ln -s /etc/php/7.0/mods-available/mongodb.ini /etc/php/7.0/cli/conf.d/30-mongodb.ini \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
@ -525,6 +530,19 @@ RUN if [ ${INSTALL_SYMFONY} = true ]; then \
|
|||||||
|
|
||||||
;fi
|
;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
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Final Touch
|
# Final Touch
|
||||||
|
@ -113,13 +113,17 @@ COPY ./aliases.sh /home/laradock/aliases.sh
|
|||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
||||||
echo "" >> ~/.bashrc
|
echo "" >> ~/.bashrc && \
|
||||||
|
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||||
|
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
||||||
echo "" >> ~/.bashrc
|
echo "" >> ~/.bashrc && \
|
||||||
|
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||||
|
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# xDebug:
|
# xDebug:
|
||||||
@ -128,7 +132,8 @@ RUN echo "" >> ~/.bashrc && \
|
|||||||
ARG INSTALL_XDEBUG=false
|
ARG INSTALL_XDEBUG=false
|
||||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||||
# Load the xdebug extension only with phpunit commands
|
# Load the xdebug extension only with phpunit commands
|
||||||
apt-get install -y --force-yes php-xdebug && \
|
apt-get update && \
|
||||||
|
apt-get install -y --force-yes php7.1-xdebug && \
|
||||||
sed -i 's/^;//g' /etc/php/7.1/cli/conf.d/20-xdebug.ini && \
|
sed -i 's/^;//g' /etc/php/7.1/cli/conf.d/20-xdebug.ini && \
|
||||||
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
|
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
|
||||||
;fi
|
;fi
|
||||||
@ -182,7 +187,8 @@ ENV INSTALL_MONGO ${INSTALL_MONGO}
|
|||||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
# Install the mongodb extension
|
# Install the mongodb extension
|
||||||
pecl install mongodb && \
|
pecl install mongodb && \
|
||||||
echo "extension=mongodb.so" >> /etc/php/7.1/cli/conf.d/30-mongodb.ini \
|
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
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
@ -342,7 +348,7 @@ RUN echo "" >> ~/.bashrc && \
|
|||||||
#####################################
|
#####################################
|
||||||
USER laradock
|
USER laradock
|
||||||
|
|
||||||
ARG INSTALL_LARAVEL_ENVOY=true
|
ARG INSTALL_LARAVEL_ENVOY=false
|
||||||
ENV INSTALL_LARAVEL_ENVOY ${INSTALL_LARAVEL_ENVOY}
|
ENV INSTALL_LARAVEL_ENVOY ${INSTALL_LARAVEL_ENVOY}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
||||||
@ -355,7 +361,7 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
|||||||
#####################################
|
#####################################
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
ARG INSTALL_LARAVEL_INSTALLER=true
|
ARG INSTALL_LARAVEL_INSTALLER=false
|
||||||
ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER}
|
ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
|
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
|
||||||
@ -385,7 +391,7 @@ RUN if [ ${INSTALL_DEPLOYER} = true ]; then \
|
|||||||
#####################################
|
#####################################
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
ARG INSTALL_LINUXBREW=true
|
ARG INSTALL_LINUXBREW=false
|
||||||
ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
|
ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||||
@ -415,7 +421,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
|||||||
#####################################
|
#####################################
|
||||||
# SQL SERVER:
|
# SQL SERVER:
|
||||||
#####################################
|
#####################################
|
||||||
ARG INSTALL_MSSQL=true
|
ARG INSTALL_MSSQL=false
|
||||||
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
||||||
@ -527,6 +533,19 @@ RUN if [ ${INSTALL_SYMFONY} = true ]; then \
|
|||||||
|
|
||||||
;fi
|
;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
|
USER laradock
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user