Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
6111ca5ff7 | |||
b393996d44 | |||
f12028576c | |||
27d3525469 | |||
8b6fdfed76 | |||
3c427d20c0 | |||
57c003722e | |||
ab4c44a434 | |||
0f7969c999 | |||
aa8f7c48a5 | |||
533925522c | |||
48a6c06ebb | |||
537f2c5033 | |||
f36f9ef6ec | |||
605c191717 | |||
f2615b9ff2 | |||
42d551dead |
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 :)
|
59
README.md
59
README.md
@ -55,7 +55,7 @@ It's like Laravel Homestead but for Docker instead of Vagrant.
|
|||||||
- [Install Prestissimo](#Install-Prestissimo)
|
- [Install Prestissimo](#Install-Prestissimo)
|
||||||
- [Install Node + NVM](#Install-Node)
|
- [Install Node + NVM](#Install-Node)
|
||||||
- [Debugging](#debugging)
|
- [Debugging](#debugging)
|
||||||
- [Upgrading Docker](#upgrading)
|
- [Upgrading LaraDock](#upgrading-laradock)
|
||||||
- [Help & Questions](#Help)
|
- [Help & Questions](#Help)
|
||||||
|
|
||||||
|
|
||||||
@ -67,11 +67,20 @@ LaraDock strives to make the development experience easier.
|
|||||||
It contains pre-packaged Docker Images that provides you a wonderful development environment without requiring you to install PHP, NGINX, MySQL, REDIS, and any other software on your local machine.
|
It contains pre-packaged Docker Images that provides you a wonderful development environment without requiring you to install PHP, NGINX, MySQL, REDIS, and any other software on your local machine.
|
||||||
|
|
||||||
|
|
||||||
**Usage Overview:** Run `NGINX`, `MySQL` and `Redis`.
|
**Usage Overview:**
|
||||||
|
|
||||||
|
Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL` and `Redis`. Then run `Laravel`.
|
||||||
|
|
||||||
|
1. Get LaraDock inside your Laravel project:
|
||||||
|
<br>
|
||||||
|
`git clone https://github.com/LaraDock/laradock.git`.
|
||||||
|
2. Enter the laradock folder and run only these Containers:
|
||||||
|
<br>
|
||||||
|
`docker-compose up -d nginx mysql redis`
|
||||||
|
3. Open your `.env` file and set `DB_HOST` to `mysql` and `REDIS_HOST` to `redis`.
|
||||||
|
4. Open your browser and visit the localhost: `http://localdock`
|
||||||
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker-compose up nginx mysql redis
|
|
||||||
```
|
|
||||||
|
|
||||||
<a name="features"></a>
|
<a name="features"></a>
|
||||||
### Features
|
### Features
|
||||||
@ -186,7 +195,7 @@ What's better than a **Demo Video**:
|
|||||||
|
|
||||||
1 - Clone the `LaraDock` repository:
|
1 - Clone the `LaraDock` repository:
|
||||||
|
|
||||||
**A)** If you already have a Laravel project, clone this repository on your `Laravel` root direcotry:
|
**A)** If you already have a Laravel project, clone this repository on your `Laravel` root directory:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git submodule add https://github.com/LaraDock/laradock.git
|
git submodule add https://github.com/LaraDock/laradock.git
|
||||||
@ -205,15 +214,19 @@ git clone https://github.com/LaraDock/laradock.git
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
||||||
>**Note:**
|
**Read Before starting:**
|
||||||
|
|
||||||
|
If you are using **Docker Toolbox** (VM), do one of the following:
|
||||||
|
|
||||||
|
- Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](#upgrading-laradock)
|
||||||
|
- Use LaraDock v3.* (Visit the `LaraDock-ToolBox` [Branch](https://github.com/LaraDock/laradock/tree/LaraDock-ToolBox)).
|
||||||
|
|
||||||
|
|
||||||
|
If you are using **Docker Native** (For Mac/Windows) or even for Linux, continue this documentation normally since LaraDock v4 and above is just for that.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
>LaraDock version 4 and above is customized only for **Docker Native** (For Mac/Windows).
|
|
||||||
<br>
|
|
||||||
>LaraDock version 3 and below is customized only for **Docker Toolbox** (VirtualBox VM). If you are still using the "Docker Toolbox" you might need to check the branch `LaraDock-ToolBox`.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
1 - Run Containers: *(Make sure you are in the `laradock` folder before running the `docker-compose` commands).*
|
1 - Run Containers: *(Make sure you are in the `laradock` folder before running the `docker-compose` commands).*
|
||||||
|
|
||||||
@ -338,7 +351,7 @@ docker-compose down
|
|||||||
2 - enter any container using:
|
2 - enter any container using:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-composer exec {container-name} bash
|
docker-compose exec {container-name} bash
|
||||||
```
|
```
|
||||||
|
|
||||||
*Example: enter MySQL container*
|
*Example: enter MySQL container*
|
||||||
@ -938,7 +951,7 @@ sudo chmod -R 777 storage bootstrap/cache
|
|||||||
|
|
||||||
#### I see "Welcome to nginx" instead of the Laravel App!
|
#### I see "Welcome to nginx" instead of the Laravel App!
|
||||||
|
|
||||||
Use `http://127.0.0.1` (or [your Docker IP](#Find-Docker-IP-Address)) instead of `http://localhost` in your browser.
|
Use `http://127.0.0.1` instead of `http://localhost` in your browser.
|
||||||
|
|
||||||
#### I see an error message containing `address already in use`
|
#### I see an error message containing `address already in use`
|
||||||
|
|
||||||
@ -948,19 +961,20 @@ Make sure the ports for the services that you are trying to run (80, 3306, etc.)
|
|||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="upgrading"></a>
|
<a name="upgrading-laradock"></a>
|
||||||
### Upgrading Docker
|
### Upgrading LaraDock
|
||||||
|
|
||||||
#### From Docker Toolbox (VirtualBox) to Docker for Mac/Windows (Native)
|
|
||||||
|
Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading LaraDock from v3.* to v4.*:
|
||||||
|
|
||||||
1. Stop the docker vm `docker-machine stop {default}`
|
1. Stop the docker vm `docker-machine stop {default}`
|
||||||
2. Install Docker for [Mac](https://docs.docker.com/docker-for-mac/) or [Windows](https://docs.docker.com/docker-for-windows/).
|
2. Install Docker for [Mac](https://docs.docker.com/docker-for-mac/) or [Windows](https://docs.docker.com/docker-for-windows/).
|
||||||
3. Upgrade LaraDock to `v4.*.*`.
|
3. Upgrade LaraDock to `v4.*.*` (`git pull origin master`)
|
||||||
4. Use LaraDock as you used to do: `docker-compose up -d nginx mysql`.
|
4. Use LaraDock as you used to do: `docker-compose up -d nginx mysql`.
|
||||||
|
|
||||||
**Note:** If you face any problem with the last step above: rebuild all your containers "Warnning Containers Data might be lost!"
|
**Note:** If you face any problem with the last step above: rebuild all your containers
|
||||||
`docker-compose build --no-cache`
|
`docker-compose build --no-cache`
|
||||||
|
"Warnning Containers Data might be lost!"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -973,6 +987,7 @@ Make sure the ports for the services that you are trying to run (80, 3306, etc.)
|
|||||||
|
|
||||||
This little project was built by one man who has a full time job and many responsibilities, so if you like this project and you find that it needs a bug fix or support for new software or upgrade any container, or anything else.. Do not hesitate to contribute, you are more than welcome :)
|
This little project was built by one man who has a full time job and many responsibilities, so if you like this project and you find that it needs a bug fix or support for new software or upgrade any container, or anything else.. Do not hesitate to contribute, you are more than welcome :)
|
||||||
|
|
||||||
|
#### Read our [Contribution Guidelines](https://github.com/LaraDock/laradock/blob/master/CONTRIBUTING.md)
|
||||||
|
|
||||||
<a name="Help"></a>
|
<a name="Help"></a>
|
||||||
## Help & Questions
|
## Help & Questions
|
||||||
|
@ -3,8 +3,14 @@
|
|||||||
# Image Setup
|
# 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.0
|
FROM laradock/php-fpm:5.6--1.1
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
@ -3,8 +3,14 @@
|
|||||||
# Image Setup
|
# 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.0
|
FROM laradock/php-fpm:7.0--1.1
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
@ -3,8 +3,14 @@
|
|||||||
# Image Setup
|
# 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.0
|
FROM laradock/workspace:1.1
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
@ -70,17 +76,18 @@ ARG PGID=1000
|
|||||||
RUN groupadd -g $PGID laradock && \
|
RUN groupadd -g $PGID laradock && \
|
||||||
useradd -u $PUID -g laradock -m laradock
|
useradd -u $PUID -g laradock -m laradock
|
||||||
|
|
||||||
# Now switch to our laradock user for the rest of user setup
|
|
||||||
USER laradock
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Composer:
|
# Composer:
|
||||||
#####################################
|
#####################################
|
||||||
|
|
||||||
# Add the composer.json
|
# Add the composer.json
|
||||||
ADD ./composer.json /home/laradock/.composer/composer.json
|
COPY ./composer.json /home/laradock/.composer/composer.json
|
||||||
|
|
||||||
# Check if global install need to be runned
|
# Make sure that ~/.composer belongs to laradock
|
||||||
|
RUN chown -R laradock:laradock /home/laradock/.composer
|
||||||
|
USER laradock
|
||||||
|
|
||||||
|
# Check if global install need to be ran
|
||||||
ARG COMPOSER_GLOBAL_INSTALL=true
|
ARG COMPOSER_GLOBAL_INSTALL=true
|
||||||
ENV COMPOSER_GLOBAL_INSTALL ${COMPOSER_GLOBAL_INSTALL}
|
ENV COMPOSER_GLOBAL_INSTALL ${COMPOSER_GLOBAL_INSTALL}
|
||||||
RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
|
RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
|
||||||
@ -95,17 +102,11 @@ RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
|
|||||||
# Check if NVM needs to be installed
|
# Check if NVM needs to be installed
|
||||||
ARG INSTALL_NODE=true
|
ARG INSTALL_NODE=true
|
||||||
ENV INSTALL_NODE ${INSTALL_NODE}
|
ENV INSTALL_NODE ${INSTALL_NODE}
|
||||||
|
ENV NVM_DIR /home/laradock/.nvm
|
||||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||||
# Install nvm (A Node Version Manager)
|
# Install nvm (A Node Version Manager)
|
||||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash \
|
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash && \
|
||||||
;fi
|
. ~/.nvm/nvm.sh && \
|
||||||
# Again check if NVM needs to be installed
|
|
||||||
# I had to split this condition link this because when I get it inside the above if statement is refuses to work!
|
|
||||||
ENV if [ ${INSTALL_NODE} = true ]; then \
|
|
||||||
# Set the ENV
|
|
||||||
NVM_DIR=/home/laradock/.nvm \
|
|
||||||
# Install NodeJS with NVM
|
|
||||||
RUN . ~/.nvm/nvm.sh && \
|
|
||||||
nvm install stable && \
|
nvm install stable && \
|
||||||
nvm use stable && \
|
nvm use stable && \
|
||||||
nvm alias stable && \
|
nvm alias stable && \
|
||||||
|
Reference in New Issue
Block a user