Compare commits
164 Commits
Author | SHA1 | Date | |
---|---|---|---|
6111ca5ff7 | |||
b393996d44 | |||
f12028576c | |||
27d3525469 | |||
8b6fdfed76 | |||
3c427d20c0 | |||
57c003722e | |||
ab4c44a434 | |||
0f7969c999 | |||
aa8f7c48a5 | |||
533925522c | |||
48a6c06ebb | |||
537f2c5033 | |||
f36f9ef6ec | |||
605c191717 | |||
f2615b9ff2 | |||
04174b476c | |||
afac432b2f | |||
2f156edafd | |||
42d551dead | |||
b7d38ef7dd | |||
c5ac8d1ada | |||
2f20216d8f | |||
5e0e120950 | |||
33b701afdc | |||
e0c18374df | |||
20adc9ca13 | |||
dd9855d411 | |||
17e252a436 | |||
dd06f1e1a0 | |||
2ba3060564 | |||
5612874b78 | |||
10af217349 | |||
e65f0dceba | |||
c792a780ee | |||
2d1c1586f5 | |||
5bb3d3b6a8 | |||
b1ec5b8d6f | |||
6e07061deb | |||
97057f259c | |||
e4f6cec536 | |||
e6cf30e7ba | |||
ed8e241007 | |||
c60cb9ab40 | |||
d58ef06907 | |||
462b5685eb | |||
11f7cfe729 | |||
d5ffc04034 | |||
062b7466f6 | |||
e1dbb972f1 | |||
419434020c | |||
2a02ed73e3 | |||
ca378ac734 | |||
67f92de4f0 | |||
c8d4461771 | |||
23b0906cd7 | |||
28a2d8e072 | |||
f97f0b0d11 | |||
05e1dd4c13 | |||
fc78ab7764 | |||
ef8579987f | |||
4dda3b969e | |||
4d2452101a | |||
233cfb5b07 | |||
63b9ec2bd8 | |||
d5a51d4de9 | |||
c7fae1a807 | |||
d6329c26b3 | |||
a96ee88692 | |||
2799a94a9f | |||
5bcbe0d291 | |||
9e7a669d5b | |||
9b084433c3 | |||
fc303dee08 | |||
d75a43c615 | |||
06337e6024 | |||
16b82d066e | |||
074deec781 | |||
2d382b683a | |||
68576f9022 | |||
2df00ecdad | |||
aeb5a6bb63 | |||
2bbf59ddda | |||
dca0545293 | |||
5f99478c76 | |||
48a53f1d24 | |||
11cdfd440b | |||
14cbe9f935 | |||
42d63236f1 | |||
d01d087431 | |||
11c65c4a00 | |||
1b9630e8a1 | |||
3a714339da | |||
65078505c1 | |||
e0b4734dab | |||
243392444f | |||
72a8fc049d | |||
de6db93da8 | |||
1af9dc5ac2 | |||
62878e7c49 | |||
3cd1f070e1 | |||
fb5ea7f42c | |||
aa8be6f95b | |||
aa0a726945 | |||
e5e04e4e18 | |||
44d8720400 | |||
f0200626ba | |||
69406db3e0 | |||
bcb749151a | |||
ca413edff4 | |||
f6d1d6f617 | |||
117382a050 | |||
2e930df2a7 | |||
4922c5fafd | |||
198c38f6cd | |||
8d216f83d5 | |||
05c5fcf216 | |||
fccee522c6 | |||
f3eb6a5fc4 | |||
685c34d12d | |||
ceba1af3ae | |||
c4100b5052 | |||
1148a3d051 | |||
bec1a32550 | |||
72cde8a8ea | |||
4f9cdb02c6 | |||
1673a80daf | |||
f130381cfe | |||
eda286ded2 | |||
a8b4b61e28 | |||
124a3553e6 | |||
3ff4aaca79 | |||
4c06a03ead | |||
1cb131ba36 | |||
99b54c5f7d | |||
8993cccc2c | |||
1090bb4db6 | |||
9c7054abe2 | |||
e7decdaaf7 | |||
18bf12bfde | |||
d829482a06 | |||
86c6389650 | |||
991e28046d | |||
ccbc73c6bc | |||
246c7366ba | |||
762e2ec07b | |||
adaaa25f47 | |||
11a13a0c33 | |||
c642560993 | |||
ea9f5c635f | |||
fd4253afb6 | |||
73310e45e8 | |||
7f91fc9798 | |||
a8a7685a40 | |||
06c4c19a6f | |||
8bff7656f6 | |||
5c9eb97db5 | |||
588819ab6d | |||
170b63a3ba | |||
19813e48c3 | |||
be7b8ee056 | |||
01a056dd25 | |||
70e1b0fe41 | |||
0959b25c05 |
12
.editorconfig
Normal file
12
.editorconfig
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
|
||||||
|
[{Dockerfile,docker-compose.yml}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1 +1,3 @@
|
|||||||
/logs
|
/logs
|
||||||
|
/data
|
||||||
|
.env
|
130
CONTRIBUTING.md
Normal file
130
CONTRIBUTING.md
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# Contributing to LaraDock
|
||||||
|
|
||||||
|
Your contribution is more than welcome. Let's keep LaraDock amazing.
|
||||||
|
|
||||||
|
|
||||||
|
### Got a Question or Problem?
|
||||||
|
|
||||||
|
If you have questions about how to use LaraDock, please direct your questions to the discussion on [Gitter](https://gitter.im/LaraDock/laradock). If you beleave your question could help others, then consider opening an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as Question).
|
||||||
|
|
||||||
|
### Found an Issue?
|
||||||
|
If you find a bug in the source code or a mistake in the documentation, you can help us by
|
||||||
|
submitting an [Issue](https://github.com/laradock/laradock/issues). Even better you can submit a Pull Request with a fix.
|
||||||
|
|
||||||
|
### Want a Feature?
|
||||||
|
You can request a new feature by submitting an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as Feature Suggestion). If you would like to implement a new feature then consider submitting a Pull Request.
|
||||||
|
|
||||||
|
|
||||||
|
## Coding Guidelines
|
||||||
|
|
||||||
|
### Support new Software
|
||||||
|
|
||||||
|
* Create folder with the software name.
|
||||||
|
|
||||||
|
* Add a `Dockerfile`, write your code there.
|
||||||
|
|
||||||
|
* You may add additional files in the software folder.
|
||||||
|
|
||||||
|
* Add the software to the `docker-compose.yml` file.
|
||||||
|
|
||||||
|
* Make sure you follow our commenting style.
|
||||||
|
|
||||||
|
* Add the software in the `Readme`.
|
||||||
|
|
||||||
|
### Edit existing Software
|
||||||
|
|
||||||
|
* Open the software (container) folder.
|
||||||
|
|
||||||
|
* Edit the files you want to update.
|
||||||
|
|
||||||
|
* **Note:** If you want to edit the base image of the `Workspace` or the `php-fpm` Containers,
|
||||||
|
you need to edit their Dockerfiles from their Github repositories. For more info read their Dockerfiles comment on the LaraDock repository.
|
||||||
|
|
||||||
|
* Make sure to update the `Readme` incase you made any changes.
|
||||||
|
|
||||||
|
## Issue/PR Submission Guidelines
|
||||||
|
|
||||||
|
### Submitting an Issue
|
||||||
|
Before you submit your issue search the archive, maybe your question was already answered.
|
||||||
|
|
||||||
|
If your issue appears to be a bug, and hasn't been reported, open a new issue.
|
||||||
|
Help us to maximize the effort we can spend fixing issues and adding new
|
||||||
|
features, by not reporting duplicate issues.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Submitting a Pull Request (PR)
|
||||||
|
Before you submit your pull request consider the following guidelines:
|
||||||
|
|
||||||
|
* Search [GitHub](https://github.com/LaraDock/laradock/pulls) for an open or closed Pull Request that relates to your submission. You don't want to duplicate effort.
|
||||||
|
|
||||||
|
* Make your changes in a new git branch:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git checkout -b my-fix-branch master
|
||||||
|
```
|
||||||
|
* Commit your changes using a descriptive commit message.
|
||||||
|
|
||||||
|
* Push your branch to GitHub:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git push origin my-fix-branch
|
||||||
|
```
|
||||||
|
|
||||||
|
* In GitHub, send a pull request to `laradock:master`.
|
||||||
|
* If we suggest changes then:
|
||||||
|
* Make the required updates.
|
||||||
|
* Commit your changes to your branch (e.g. `my-fix-branch`).
|
||||||
|
* Push the changes to your GitHub repository (this will update your Pull Request).
|
||||||
|
|
||||||
|
> If the PR gets too outdated we may ask you to rebase and force push to update the PR:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git rebase master -i
|
||||||
|
git push origin my-fix-branch -f
|
||||||
|
```
|
||||||
|
|
||||||
|
*WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments on code that were previously made by you and others in your commits.*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### After your pull request is merged
|
||||||
|
|
||||||
|
After your pull request is merged, you can safely delete your branch and pull the changes
|
||||||
|
from the main (upstream) repository:
|
||||||
|
|
||||||
|
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git push origin --delete my-fix-branch
|
||||||
|
```
|
||||||
|
|
||||||
|
* Check out the master branch:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git checkout master -f
|
||||||
|
```
|
||||||
|
|
||||||
|
* Delete the local branch:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git branch -D my-fix-branch
|
||||||
|
```
|
||||||
|
|
||||||
|
* Update your master with the latest upstream version:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git pull --ff upstream master
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
### Happy Coding :)
|
17
apache2/Dockerfile
Normal file
17
apache2/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
FROM webdevops/apache:ubuntu-16.04
|
||||||
|
|
||||||
|
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
|
||||||
|
|
||||||
|
ARG PHP_SOCKET="php-fpm:9000"
|
||||||
|
|
||||||
|
ENV WEB_PHP_SOCKET=$PHP_SOCKET
|
||||||
|
|
||||||
|
ENV WEB_DOCUMENT_ROOT=/var/www/laravel/public
|
||||||
|
|
||||||
|
EXPOSE 80 443
|
||||||
|
|
||||||
|
WORKDIR /var/www/laravel/public
|
||||||
|
|
||||||
|
ENTRYPOINT ["/opt/docker/bin/entrypoint.sh"]
|
||||||
|
|
||||||
|
CMD ["supervisord"]
|
@ -7,9 +7,11 @@ RUN apt-get update && apt-get install -y curl
|
|||||||
RUN curl -sL https://github.com/ptrofimov/beanstalk_console/archive/master.tar.gz | tar xvz -C /tmp
|
RUN curl -sL https://github.com/ptrofimov/beanstalk_console/archive/master.tar.gz | tar xvz -C /tmp
|
||||||
RUN mv /tmp/beanstalk_console-master /source
|
RUN mv /tmp/beanstalk_console-master /source
|
||||||
|
|
||||||
RUN apt-get remove --purge -y curl && apt-get autoclean && apt-get clean
|
RUN apt-get remove --purge -y curl && \
|
||||||
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
apt-get autoclean && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
EXPOSE 2080
|
EXPOSE 2080
|
||||||
|
|
||||||
CMD bash -c 'BEANSTALK_SERVERS=$BEANSTALKD_PORT_11300_TCP_ADDR:11300 php -S 0.0.0.0:2080 -t /source/public'
|
CMD bash -c 'BEANSTALK_SERVERS=$BEANSTALKD_PORT_11300_TCP_ADDR:11300 php -S 0.0.0.0:2080 -t /source/public'
|
||||||
|
17
caddy/Caddyfile
Normal file
17
caddy/Caddyfile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Docs: https://caddyserver.com/docs/caddyfile
|
||||||
|
0.0.0.0:80
|
||||||
|
root /var/www/laravel/public
|
||||||
|
fastcgi / php-fpm:9000 php {
|
||||||
|
index index.php
|
||||||
|
}
|
||||||
|
rewrite {
|
||||||
|
r .*
|
||||||
|
ext /
|
||||||
|
to /index.php?{query}
|
||||||
|
}
|
||||||
|
browse
|
||||||
|
log stdout
|
||||||
|
errors stderr
|
||||||
|
# Uncomment to enable TLS (HTTPS)
|
||||||
|
# Change the first list to listen on port 443 when enabling TLS
|
||||||
|
#tls self_signed
|
25
caddy/Dockerfile
Normal file
25
caddy/Dockerfile
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
FROM alpine:3.4
|
||||||
|
|
||||||
|
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
|
||||||
|
|
||||||
|
LABEL caddy_version="0.9.0" architecture="amd64"
|
||||||
|
|
||||||
|
RUN apk update \
|
||||||
|
&& apk upgrade \
|
||||||
|
&& apk add tar curl
|
||||||
|
|
||||||
|
RUN curl --silent --show-error --fail --location \
|
||||||
|
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
|
||||||
|
"https://github.com/mholt/caddy/releases/download/v0.9.0/caddy_linux_amd64.tar.gz" \
|
||||||
|
| tar --no-same-owner -C /usr/bin/ -xz caddy_linux_amd64 \
|
||||||
|
&& mv /usr/bin/caddy_linux_amd64 /usr/bin/caddy \
|
||||||
|
&& chmod 0755 /usr/bin/caddy \
|
||||||
|
&& /usr/bin/caddy -version
|
||||||
|
|
||||||
|
EXPOSE 80 443 2015
|
||||||
|
|
||||||
|
WORKDIR /var/www/laravel/public
|
||||||
|
|
||||||
|
ENTRYPOINT ["caddy"]
|
||||||
|
|
||||||
|
CMD ["-conf", "/etc/Caddyfile"]
|
@ -2,41 +2,47 @@ version: '2'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
|
### Workspace Utilities Container ###########################
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
build:
|
||||||
|
context: ./workspace
|
||||||
|
args:
|
||||||
|
- INSTALL_MONGO=false
|
||||||
|
- INSTALL_XDEBUG=false
|
||||||
|
- INSTALL_NODE=false
|
||||||
|
- COMPOSER_GLOBAL_INSTALL=false
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
volumes_from:
|
||||||
|
- volumes_source
|
||||||
|
tty: true
|
||||||
|
|
||||||
### PHP-FPM Container #######################################
|
### PHP-FPM Container #######################################
|
||||||
|
|
||||||
php-fpm:
|
php-fpm:
|
||||||
build:
|
build:
|
||||||
context: ./php-fpm
|
context: ./php-fpm
|
||||||
|
args:
|
||||||
|
- INSTALL_MONGO=false
|
||||||
|
- INSTALL_XDEBUG=false
|
||||||
dockerfile: Dockerfile-70
|
dockerfile: Dockerfile-70
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- application
|
- volumes_source
|
||||||
expose:
|
expose:
|
||||||
- "9000"
|
- "9000"
|
||||||
|
links:
|
||||||
### Laravel Application Code Container ######################
|
- workspace
|
||||||
|
|
||||||
application:
|
|
||||||
build: ./application
|
|
||||||
volumes:
|
|
||||||
- ../:/var/www/laravel
|
|
||||||
|
|
||||||
### Databases Data Container ################################
|
|
||||||
|
|
||||||
data:
|
|
||||||
build: ./data
|
|
||||||
volumes:
|
|
||||||
- /var/lib/mysql
|
|
||||||
- /var/lib/postgres
|
|
||||||
- /var/lib/mariadb
|
|
||||||
- /var/lib/redis
|
|
||||||
- /var/lib/memcached
|
|
||||||
|
|
||||||
### Nginx Server Container ##################################
|
### Nginx Server Container ##################################
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
build: ./nginx
|
build:
|
||||||
|
context: ./nginx
|
||||||
|
args:
|
||||||
|
- PHP_UPSTREAM=php-fpm
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- application
|
- volumes_source
|
||||||
volumes:
|
volumes:
|
||||||
- ./logs/nginx/:/var/log/nginx
|
- ./logs/nginx/:/var/log/nginx
|
||||||
ports:
|
ports:
|
||||||
@ -45,12 +51,40 @@ services:
|
|||||||
links:
|
links:
|
||||||
- php-fpm
|
- php-fpm
|
||||||
|
|
||||||
|
### Apache Server Container ##################################
|
||||||
|
|
||||||
|
apache2:
|
||||||
|
build:
|
||||||
|
context: ./apache2
|
||||||
|
args:
|
||||||
|
- PHP_SOCKET="php-fpm:9000"
|
||||||
|
volumes_from:
|
||||||
|
- volumes_source
|
||||||
|
volumes:
|
||||||
|
- ./logs/apache2:/var/log/apache2
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
|
links:
|
||||||
|
- php-fpm
|
||||||
|
|
||||||
|
### HHVM Container ##########################################
|
||||||
|
|
||||||
|
hhvm:
|
||||||
|
build: ./hhvm
|
||||||
|
volumes_from:
|
||||||
|
- volumes_source
|
||||||
|
expose:
|
||||||
|
- "9000"
|
||||||
|
links:
|
||||||
|
- workspace
|
||||||
|
|
||||||
### MySQL Container #########################################
|
### MySQL Container #########################################
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
build: ./mysql
|
build: ./mysql
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- data
|
- volumes_data
|
||||||
ports:
|
ports:
|
||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
environment:
|
environment:
|
||||||
@ -58,30 +92,26 @@ services:
|
|||||||
MYSQL_USER: homestead
|
MYSQL_USER: homestead
|
||||||
MYSQL_PASSWORD: secret
|
MYSQL_PASSWORD: secret
|
||||||
MYSQL_ROOT_PASSWORD: root
|
MYSQL_ROOT_PASSWORD: root
|
||||||
links:
|
|
||||||
- php-fpm
|
|
||||||
|
|
||||||
### PostgreSQL Container ####################################
|
### PostgreSQL Container ####################################
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
build: ./postgres
|
build: ./postgres
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- data
|
- volumes_data
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: homestead
|
POSTGRES_DB: homestead
|
||||||
POSTGRES_USER: homestead
|
POSTGRES_USER: homestead
|
||||||
POSTGRES_PASSWORD: secret
|
POSTGRES_PASSWORD: secret
|
||||||
links:
|
|
||||||
- php-fpm
|
|
||||||
|
|
||||||
### MariaDB Container #######################################
|
### MariaDB Container #######################################
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
build: ./mariadb
|
build: ./mariadb
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- data
|
- volumes_data
|
||||||
ports:
|
ports:
|
||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
environment:
|
environment:
|
||||||
@ -89,26 +119,43 @@ services:
|
|||||||
MYSQL_USER: homestead
|
MYSQL_USER: homestead
|
||||||
MYSQL_PASSWORD: secret
|
MYSQL_PASSWORD: secret
|
||||||
MYSQL_ROOT_PASSWORD: root
|
MYSQL_ROOT_PASSWORD: root
|
||||||
links:
|
|
||||||
- php-fpm
|
### Neo4j Container #########################################
|
||||||
|
|
||||||
|
neo4j:
|
||||||
|
build: ./neo4j
|
||||||
|
ports:
|
||||||
|
- "7474:7474"
|
||||||
|
- "1337:1337"
|
||||||
|
environment:
|
||||||
|
- NEO4J_AUTH=homestead:secret
|
||||||
|
volumes_from:
|
||||||
|
- volumes_data
|
||||||
|
|
||||||
|
### MongoDB Container #######################################
|
||||||
|
|
||||||
|
mongo:
|
||||||
|
build: ./mongo
|
||||||
|
ports:
|
||||||
|
- "27017:27017"
|
||||||
|
volumes_from:
|
||||||
|
- volumes_data
|
||||||
|
|
||||||
### Redis Container #########################################
|
### Redis Container #########################################
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
build: ./redis
|
build: ./redis
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- data
|
- volumes_data
|
||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
links:
|
|
||||||
- php-fpm
|
|
||||||
|
|
||||||
### Memcached Container #####################################
|
### Memcached Container #####################################
|
||||||
|
|
||||||
memcached:
|
memcached:
|
||||||
build: ./memcached
|
build: ./memcached
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- data
|
- volumes_data
|
||||||
ports:
|
ports:
|
||||||
- "11211:11211"
|
- "11211:11211"
|
||||||
links:
|
links:
|
||||||
@ -133,12 +180,39 @@ services:
|
|||||||
links:
|
links:
|
||||||
- beanstalkd
|
- beanstalkd
|
||||||
|
|
||||||
### Workspace Utilities Container ###########################
|
### Caddy Server Container ##################################
|
||||||
|
|
||||||
workspace:
|
caddy:
|
||||||
build: ./workspace
|
build: ./caddy
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- application
|
- volumes_source
|
||||||
tty: true
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
|
- "2015:2015"
|
||||||
|
volumes:
|
||||||
|
- ./caddy/Caddyfile:/etc/Caddyfile
|
||||||
|
links:
|
||||||
|
- php-fpm
|
||||||
|
|
||||||
|
### Laravel Application Code Container ######################
|
||||||
|
|
||||||
|
volumes_source:
|
||||||
|
build: ./volumes/application
|
||||||
|
volumes:
|
||||||
|
- ../:/var/www/laravel
|
||||||
|
|
||||||
|
### Databases Data Container ################################
|
||||||
|
|
||||||
|
volumes_data:
|
||||||
|
build: ./volumes/data
|
||||||
|
volumes:
|
||||||
|
- ./data/mysql:/var/lib/mysql
|
||||||
|
- ./data/postgres:/var/lib/postgres
|
||||||
|
- ./data/mariadb:/var/lib/mariadb
|
||||||
|
- ./data/memcached:/var/lib/memcached
|
||||||
|
- ./data/redis:/data
|
||||||
|
- ./data/neo4j:/var/lib/neo4j/data
|
||||||
|
- ./data/mongo:/data/db
|
||||||
|
|
||||||
### Add more Containers below ###############################
|
### Add more Containers below ###############################
|
||||||
|
23
hhvm/Dockerfile
Normal file
23
hhvm/Dockerfile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
FROM ubuntu:14.04
|
||||||
|
|
||||||
|
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
|
||||||
|
|
||||||
|
RUN apt-get update -y \
|
||||||
|
&& apt-get install -y software-properties-common \
|
||||||
|
&& add-apt-repository "deb http://dl.hhvm.com/ubuntu $(lsb_release -sc) main" \
|
||||||
|
&& apt-get update -y \
|
||||||
|
&& apt-get install -y hhvm \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN mkdir -p /var/www/laravel
|
||||||
|
|
||||||
|
ADD server.ini /etc/hhvm/server.ini
|
||||||
|
|
||||||
|
RUN usermod -u 1000 www-data
|
||||||
|
|
||||||
|
WORKDIR /var/www/laravel
|
||||||
|
|
||||||
|
CMD ["/usr/bin/hhvm", "-m", "server", "-c", "/etc/hhvm/server.ini"]
|
||||||
|
|
||||||
|
EXPOSE 9000
|
20
hhvm/server.ini
Normal file
20
hhvm/server.ini
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
; php options
|
||||||
|
|
||||||
|
pid = /var/run/hhvm/pid
|
||||||
|
|
||||||
|
; hhvm specific
|
||||||
|
hhvm.server.port = 9000
|
||||||
|
hhvm.server.type = fastcgi
|
||||||
|
hhvm.server.default_document = index.php
|
||||||
|
hhvm.server.error_document404 = index.php
|
||||||
|
hhvm.server.upload.upload_max_file_size = 25M
|
||||||
|
hhvm.log.level = Error
|
||||||
|
hhvm.log.header = true
|
||||||
|
hhvm.log.access[default][file] = /var/log/hhvm/access.log
|
||||||
|
hhvm.log.access[default][format] = "%h %l %u %t \"%r\" %>s %b"
|
||||||
|
hhvm.server.source_root=/var/www/laravel/public
|
||||||
|
hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc
|
||||||
|
|
||||||
|
; Uncomment to log to files instead of STDOUT
|
||||||
|
;hhvm.log.use_log_file = true
|
||||||
|
;hhvm.log.file = /var/log/hhvm/error.log
|
12
mongo/Dockerfile
Normal file
12
mongo/Dockerfile
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
FROM mongo:latest
|
||||||
|
|
||||||
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
#COPY mongo.conf /usr/local/etc/mongo/mongo.conf
|
||||||
|
|
||||||
|
VOLUME /data/db /data/configdb
|
||||||
|
|
||||||
|
CMD ["mongod"]
|
||||||
|
|
||||||
|
EXPOSE 27017
|
||||||
|
|
7
neo4j/Dockerfile
Normal file
7
neo4j/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM tpires/neo4j
|
||||||
|
|
||||||
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
VOLUME /var/lib/neo4j/data
|
||||||
|
|
||||||
|
EXPOSE 7474 1337
|
@ -1,13 +1,18 @@
|
|||||||
FROM nginx:latest
|
FROM nginx:alpine
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
ADD nginx.conf /etc/nginx/
|
ADD nginx.conf /etc/nginx/
|
||||||
ADD laravel.conf /etc/nginx/sites-available/
|
ADD laravel.conf /etc/nginx/conf.d/laravel.conf
|
||||||
|
|
||||||
RUN echo "upstream php-upstream { server php-fpm:9000; }" > /etc/nginx/conf.d/upstream.conf
|
ARG PHP_UPSTREAM=php-fpm
|
||||||
|
|
||||||
RUN usermod -u 1000 www-data
|
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
|
||||||
|
|
||||||
CMD ["nginx"]
|
CMD ["nginx"]
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
user www-data;
|
user www-data;
|
||||||
worker_processes 4;
|
worker_processes 4;
|
||||||
pid /run/nginx.pid;
|
pid /run/nginx.pid;
|
||||||
|
daemon off;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 2048;
|
worker_connections 2048;
|
||||||
@ -15,15 +16,13 @@ http {
|
|||||||
tcp_nodelay on;
|
tcp_nodelay on;
|
||||||
keepalive_timeout 15;
|
keepalive_timeout 15;
|
||||||
types_hash_max_size 2048;
|
types_hash_max_size 2048;
|
||||||
|
client_max_body_size 20M;
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
access_log off;
|
access_log /var/log/nginx/access.log;
|
||||||
error_log off;
|
error_log /var/log/nginx/error.log;
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_disable "msie6";
|
gzip_disable "msie6";
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
include /etc/nginx/sites-available/*;
|
|
||||||
open_file_cache max=100;
|
open_file_cache max=100;
|
||||||
}
|
}
|
||||||
|
|
||||||
daemon off;
|
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
FROM php:5.5-fpm
|
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
|
||||||
|
|
||||||
ADD ./laravel.ini /usr/local/etc/php/conf.d
|
|
||||||
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
libpq-dev \
|
|
||||||
libmemcached-dev \
|
|
||||||
curl
|
|
||||||
|
|
||||||
# Install extensions using the helper script provided by the base image
|
|
||||||
RUN docker-php-ext-install \
|
|
||||||
pdo_mysql \
|
|
||||||
pdo_pgsql
|
|
||||||
|
|
||||||
#Install memcached
|
|
||||||
RUN pecl install memcached \
|
|
||||||
&& docker-php-ext-enable memcached
|
|
||||||
|
|
||||||
RUN usermod -u 1000 www-data
|
|
||||||
|
|
||||||
WORKDIR /var/www/laravel
|
|
||||||
|
|
||||||
CMD ["php-fpm"]
|
|
||||||
|
|
||||||
EXPOSE 9000
|
|
@ -1,23 +1,75 @@
|
|||||||
FROM php:5.6-fpm
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Image Setup
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# To edit the 'php-fpm' base Image, visit its repository on Github
|
||||||
|
# https://github.com/LaraDock/php-fpm
|
||||||
|
#
|
||||||
|
# To change its version, see the available Tags on the Docker Hub:
|
||||||
|
# https://hub.docker.com/r/laradock/php-fpm/tags/
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM laradock/php-fpm:5.6--1.1
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Mandatory Software's Installation
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....)
|
||||||
|
# are installed on the base image 'laradock/php-fpm' image. If you want
|
||||||
|
# to add more Software's or remove existing one, you need to edit the
|
||||||
|
# base image (https://github.com/LaraDock/php-fpm).
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Optional Software's Installation
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Optional Software's will only be installed if you set them to `true`
|
||||||
|
# in the `docker-compose.yml` before the build.
|
||||||
|
#
|
||||||
|
# - INSTALL_XDEBUG= false
|
||||||
|
# - INSTALL_MONGO= false
|
||||||
|
#
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# xDebug:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_XDEBUG=true
|
||||||
|
ENV INSTALL_XDEBUG ${INSTALL_XDEBUG}
|
||||||
|
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||||
|
# Install the xdebug extention
|
||||||
|
pecl install xdebug && \
|
||||||
|
docker-php-ext-enable xdebug \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# MongoDB:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_MONGO=true
|
||||||
|
ENV INSTALL_MONGO ${INSTALL_MONGO}
|
||||||
|
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
|
# Install the mongodb extention
|
||||||
|
pecl install mongodb \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Final Touch
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
|
||||||
ADD ./laravel.ini /usr/local/etc/php/conf.d
|
ADD ./laravel.ini /usr/local/etc/php/conf.d
|
||||||
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
|
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN rm -r /var/lib/apt/lists/*
|
||||||
libpq-dev \
|
|
||||||
libmemcached-dev \
|
|
||||||
curl
|
|
||||||
|
|
||||||
# Install extensions using the helper script provided by the base image
|
|
||||||
RUN docker-php-ext-install \
|
|
||||||
pdo_mysql \
|
|
||||||
pdo_pgsql
|
|
||||||
|
|
||||||
#Install memcached
|
|
||||||
RUN pecl install memcached \
|
|
||||||
&& docker-php-ext-enable memcached
|
|
||||||
|
|
||||||
RUN usermod -u 1000 www-data
|
RUN usermod -u 1000 www-data
|
||||||
|
|
||||||
|
@ -1,27 +1,75 @@
|
|||||||
FROM php:7.0-fpm
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Image Setup
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# To edit the 'php-fpm' base Image, visit its repository on Github
|
||||||
|
# https://github.com/LaraDock/php-fpm
|
||||||
|
#
|
||||||
|
# To change its version, see the available Tags on the Docker Hub:
|
||||||
|
# https://hub.docker.com/r/laradock/php-fpm/tags/
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM laradock/php-fpm:7.0--1.1
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Mandatory Software's Installation
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....)
|
||||||
|
# are installed on the base image 'laradock/php-fpm' image. If you want
|
||||||
|
# to add more Software's or remove existing one, you need to edit the
|
||||||
|
# base image (https://github.com/LaraDock/php-fpm).
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Optional Software's Installation
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Optional Software's will only be installed if you set them to `true`
|
||||||
|
# in the `docker-compose.yml` before the build.
|
||||||
|
#
|
||||||
|
# - INSTALL_XDEBUG= false
|
||||||
|
# - INSTALL_MONGO= false
|
||||||
|
#
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# xDebug:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_XDEBUG=true
|
||||||
|
ENV INSTALL_XDEBUG ${INSTALL_XDEBUG}
|
||||||
|
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||||
|
# Install the xdebug extention
|
||||||
|
pecl install xdebug && \
|
||||||
|
docker-php-ext-enable xdebug \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# MongoDB:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_MONGO=true
|
||||||
|
ENV INSTALL_MONGO ${INSTALL_MONGO}
|
||||||
|
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
|
# Install the mongodb extention
|
||||||
|
pecl install mongodb \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Final Touch
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
|
||||||
ADD ./laravel.ini /usr/local/etc/php/conf.d
|
ADD ./laravel.ini /usr/local/etc/php/conf.d
|
||||||
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
|
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN rm -r /var/lib/apt/lists/*
|
||||||
libpq-dev \
|
|
||||||
libmemcached-dev \
|
|
||||||
curl
|
|
||||||
|
|
||||||
# Install extensions using the helper script provided by the base image
|
|
||||||
RUN docker-php-ext-install \
|
|
||||||
pdo_mysql \
|
|
||||||
pdo_pgsql
|
|
||||||
|
|
||||||
# Install Memcached for php 7
|
|
||||||
RUN curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \
|
|
||||||
&& mkdir -p /usr/src/php/ext/memcached \
|
|
||||||
&& tar -C /usr/src/php/ext/memcached -zxvf /tmp/memcached.tar.gz --strip 1 \
|
|
||||||
&& docker-php-ext-configure memcached \
|
|
||||||
&& docker-php-ext-install memcached \
|
|
||||||
&& rm /tmp/memcached.tar.gz
|
|
||||||
|
|
||||||
RUN usermod -u 1000 www-data
|
RUN usermod -u 1000 www-data
|
||||||
|
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
date.timezone = UTC
|
date.timezone=UTC
|
||||||
display_errors = Off
|
display_errors=Off
|
||||||
log_errors = On
|
log_errors=On
|
||||||
|
extension=mongodb.so
|
||||||
|
|
||||||
|
; Maximum amount of memory a script may consume (128MB)
|
||||||
|
; http://php.net/memory-limit
|
||||||
|
memory_limit = 128M
|
||||||
|
; Maximum allowed size for uploaded files.
|
||||||
|
; http://php.net/upload-max-filesize
|
||||||
|
upload_max_filesize = 20M
|
||||||
|
; Sets max size of post data allowed.
|
||||||
|
; http://php.net/post-max-size
|
||||||
|
post_max_size = 20M
|
||||||
|
@ -4,6 +4,8 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
|||||||
|
|
||||||
#COPY redis.conf /usr/local/etc/redis/redis.conf
|
#COPY redis.conf /usr/local/etc/redis/redis.conf
|
||||||
|
|
||||||
CMD [ "redis-server" ]
|
VOLUME /data
|
||||||
|
|
||||||
EXPOSE 6379
|
EXPOSE 6379
|
||||||
|
|
||||||
|
CMD ["redis-server"]
|
||||||
|
@ -1,74 +1,136 @@
|
|||||||
FROM phusion/baseimage:latest
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Image Setup
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# To edit the 'workspace' base Image, visit its repository on Github
|
||||||
|
# https://github.com/LaraDock/workspace
|
||||||
|
#
|
||||||
|
# To change its version, see the available Tags on the Docker Hub:
|
||||||
|
# https://hub.docker.com/r/laradock/workspace/tags/
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM laradock/workspace:1.1
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive
|
#
|
||||||
RUN locale-gen en_US.UTF-8
|
#--------------------------------------------------------------------------
|
||||||
|
# Mandatory Software's Installation
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Mandatory Software's such as ("php7.0-cli", "git", "vim", ....) are
|
||||||
|
# installed on the base image 'laradock/workspace' image. If you want
|
||||||
|
# to add more Software's or remove existing one, you need to edit the
|
||||||
|
# base image (https://github.com/LaraDock/workspace).
|
||||||
|
#
|
||||||
|
|
||||||
ENV LANGUAGE=en_US.UTF-8
|
#
|
||||||
ENV LC_ALL=en_US.UTF-8
|
#--------------------------------------------------------------------------
|
||||||
ENV LC_CTYPE=UTF-8
|
# Optional Software's Installation
|
||||||
ENV LANG=en_US.UTF-8
|
#--------------------------------------------------------------------------
|
||||||
ENV TERM xterm
|
#
|
||||||
|
# Optional Software's will only be installed if you set them to `true`
|
||||||
|
# in the `docker-compose.yml` before the build.
|
||||||
|
#
|
||||||
|
# - INSTALL_XDEBUG= false
|
||||||
|
# - INSTALL_MONGO= false
|
||||||
|
# - COMPOSER_GLOBAL_INSTALL= false
|
||||||
|
# - INSTALL_NODE= false
|
||||||
|
#
|
||||||
|
|
||||||
# Install "software-properties-common" (for the "add-apt-repository")
|
#####################################
|
||||||
RUN apt-get update && apt-get install -y \
|
# xDebug:
|
||||||
software-properties-common
|
#####################################
|
||||||
|
|
||||||
# Add the "PHP 7" ppa
|
# Check if xDebug needs to be installed
|
||||||
RUN add-apt-repository -y \
|
ARG INSTALL_XDEBUG=true
|
||||||
ppa:ondrej/php
|
ENV INSTALL_XDEBUG ${INSTALL_XDEBUG}
|
||||||
|
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||||
|
# Load the xdebug extension only with phpunit commands
|
||||||
|
apt-get install -y --force-yes php7.0-xdebug && \
|
||||||
|
sed -i 's/^/;/g' /etc/php/7.0/cli/conf.d/20-xdebug.ini && \
|
||||||
|
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/laravel/vendor/bin/phpunit'" >> ~/.bashrc \
|
||||||
|
;fi
|
||||||
|
|
||||||
# Install PHP-CLI 7, some PHP extentions and some useful Tools with APT
|
#####################################
|
||||||
RUN apt-get update && apt-get install -y \
|
# MongoDB:
|
||||||
php7.0-cli \
|
#####################################
|
||||||
php7.0-common \
|
|
||||||
php7.0-curl \
|
|
||||||
php7.0-json \
|
|
||||||
php7.0-xml \
|
|
||||||
php7.0-mbstring \
|
|
||||||
php7.0-mcrypt \
|
|
||||||
php7.0-mysql \
|
|
||||||
php7.0-sqlite \
|
|
||||||
php7.0-sqlite3 \
|
|
||||||
php7.0-zip \
|
|
||||||
sqlite3 \
|
|
||||||
libsqlite3-dev \
|
|
||||||
git \
|
|
||||||
curl \
|
|
||||||
vim \
|
|
||||||
nano \
|
|
||||||
nodejs \
|
|
||||||
nodejs-dev \
|
|
||||||
npm
|
|
||||||
|
|
||||||
# Clean up, to free some space
|
# Check if Mongo needs to be installed
|
||||||
RUN apt-get clean
|
ARG INSTALL_MONGO=true
|
||||||
|
ENV INSTALL_MONGO ${INSTALL_MONGO}
|
||||||
|
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
|
# Install the mongodb extension
|
||||||
|
pecl install mongodb && \
|
||||||
|
echo "extension=mongodb.so" >> /etc/php/7.0/cli/php.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
# Install gulp and bower with NPM
|
#####################################
|
||||||
RUN npm install -g \
|
# Non-Root User:
|
||||||
gulp \
|
#####################################
|
||||||
bower
|
|
||||||
|
|
||||||
# Add a symbolic link for Node
|
# Add a non-root user to prevent files being created with root permissions on host machine.
|
||||||
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
ARG PUID=1000
|
||||||
|
ARG PGID=1000
|
||||||
|
RUN groupadd -g $PGID laradock && \
|
||||||
|
useradd -u $PUID -g laradock -m laradock
|
||||||
|
|
||||||
# Add an alias for PHPUnit
|
#####################################
|
||||||
RUN echo "alias phpunit='./vendor/bin/phpunit'" >> ~/.bashrc
|
# Composer:
|
||||||
|
#####################################
|
||||||
|
|
||||||
# Install Composer
|
# Add the composer.json
|
||||||
RUN curl -s http://getcomposer.org/installer | php \
|
COPY ./composer.json /home/laradock/.composer/composer.json
|
||||||
&& mv composer.phar /usr/local/bin/ \
|
|
||||||
&& echo "alias composer='/usr/local/bin/composer.phar'" >> ~/.bashrc
|
|
||||||
|
|
||||||
# Install the Laravel Installer
|
# Make sure that ~/.composer belongs to laradock
|
||||||
RUN composer.phar global require "laravel/installer" \
|
RUN chown -R laradock:laradock /home/laradock/.composer
|
||||||
&& echo "export PATH='~/.composer/vendor/bin:$PATH'" >> ~/.bashrc
|
USER laradock
|
||||||
|
|
||||||
# Source the bash
|
# Check if global install need to be ran
|
||||||
RUN . ~/.bashrc
|
ARG COMPOSER_GLOBAL_INSTALL=true
|
||||||
|
ENV COMPOSER_GLOBAL_INSTALL ${COMPOSER_GLOBAL_INSTALL}
|
||||||
|
RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
|
||||||
|
# run the install
|
||||||
|
composer global install \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Node / NVM:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
# Check if NVM needs to be installed
|
||||||
|
ARG INSTALL_NODE=true
|
||||||
|
ENV INSTALL_NODE ${INSTALL_NODE}
|
||||||
|
ENV NVM_DIR /home/laradock/.nvm
|
||||||
|
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||||
|
# Install nvm (A Node Version Manager)
|
||||||
|
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash && \
|
||||||
|
. ~/.nvm/nvm.sh && \
|
||||||
|
nvm install stable && \
|
||||||
|
nvm use stable && \
|
||||||
|
nvm alias stable && \
|
||||||
|
npm install -g gulp bower \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
# Wouldn't execute when added to the RUN statement in the above block
|
||||||
|
# Source NVM when loading bash since ~/.profile isn't loaded on non-login shell
|
||||||
|
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||||
|
echo "" >> ~/.bashrc && \
|
||||||
|
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc && \
|
||||||
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Final Touch
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
USER root
|
||||||
|
RUN apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
# Set default work directory
|
||||||
WORKDIR /var/www/laravel
|
WORKDIR /var/www/laravel
|
||||||
|
5
workspace/composer.json
Normal file
5
workspace/composer.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"require": {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user