Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
9348dd95a0 | |||
37508bb3ca | |||
c3f5dfa741 | |||
6288935884 | |||
c5e2e7e1e2 | |||
e9d4e5579e | |||
5d2761bc92 | |||
43b9515b61 | |||
a94f08920a | |||
b52dcd4a19 | |||
4c8e09526d | |||
a80ef301a9 | |||
fbc71b5a22 | |||
ad5883cdfd | |||
f9fe45cb75 | |||
a8120a1c46 | |||
6c55f47fd4 | |||
f1cd4bb0e2 | |||
53146df5d6 | |||
14f6dffe99 | |||
721e04370f |
116
README.md
116
README.md
@ -65,6 +65,7 @@ Laradock is configured to run Laravel Apps by default, and it can be modified to
|
|||||||
- [Laravel](#Laravel):
|
- [Laravel](#Laravel):
|
||||||
- [Install Laravel from a Docker Container](#Install-Laravel)
|
- [Install Laravel from a Docker Container](#Install-Laravel)
|
||||||
- [Run Artisan Commands](#Run-Artisan-Commands)
|
- [Run Artisan Commands](#Run-Artisan-Commands)
|
||||||
|
- [Run Laravel Queue Worker](#Run-Laravel-Queue-Worker)
|
||||||
- [Use Redis](#Use-Redis)
|
- [Use Redis](#Use-Redis)
|
||||||
- [Use Mongo](#Use-Mongo)
|
- [Use Mongo](#Use-Mongo)
|
||||||
- [Use PhpMyAdmin](#Use-phpMyAdmin)
|
- [Use PhpMyAdmin](#Use-phpMyAdmin)
|
||||||
@ -87,6 +88,9 @@ Laradock is configured to run Laravel Apps by default, and it can be modified to
|
|||||||
- [Install Prestissimo](#Install-Prestissimo)
|
- [Install Prestissimo](#Install-Prestissimo)
|
||||||
- [Install Node + NVM](#Install-Node)
|
- [Install Node + NVM](#Install-Node)
|
||||||
- [Install Node + YARN](#Install-Yarn)
|
- [Install Node + YARN](#Install-Yarn)
|
||||||
|
- [Install Linuxbrew](#Install-Linuxbrew)
|
||||||
|
- [Common Terminal Aliases](#Common-Aliases)
|
||||||
|
- [Install Deployer](#Install-Deployer)
|
||||||
- [Debugging](#debugging)
|
- [Debugging](#debugging)
|
||||||
- [Upgrading LaraDock](#upgrading-laradock)
|
- [Upgrading LaraDock](#upgrading-laradock)
|
||||||
- [Related Projects](#related-projects)
|
- [Related Projects](#related-projects)
|
||||||
@ -188,12 +192,15 @@ That's it! enjoy :)
|
|||||||
- PHP7-CLI
|
- PHP7-CLI
|
||||||
- Composer
|
- Composer
|
||||||
- Git
|
- Git
|
||||||
|
- Linuxbrew
|
||||||
- Node
|
- Node
|
||||||
- Gulp
|
- Gulp
|
||||||
- SQLite
|
- SQLite
|
||||||
- xDebug
|
- xDebug
|
||||||
- Envoy
|
- Envoy
|
||||||
|
- Deployer
|
||||||
- Vim
|
- Vim
|
||||||
|
- Yarn
|
||||||
- ... Many other supported tools are not documented. (Will be updated soon)
|
- ... Many other supported tools are not documented. (Will be updated soon)
|
||||||
|
|
||||||
>If you can't find your Software, build it yourself and add it to this list. Contributions are welcomed :)
|
>If you can't find your Software, build it yourself and add it to this list. Contributions are welcomed :)
|
||||||
@ -409,7 +416,8 @@ You can select your own combination of Containers form the list below:
|
|||||||
```bash
|
```bash
|
||||||
docker-compose exec workspace bash
|
docker-compose exec workspace bash
|
||||||
```
|
```
|
||||||
Alternatively, for Windows Powershell users: execute the following command to enter any running container:
|
|
||||||
|
Alternativey, for Windows Powershell users: execute the following command to enter any running container:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker exec -it {workspace-container-id} bash
|
docker exec -it {workspace-container-id} bash
|
||||||
@ -921,6 +929,31 @@ phpunit
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Run-Laravel-Queue-Worker"></a>
|
||||||
|
### Run Laravel Queue Worker
|
||||||
|
|
||||||
|
1 - First add `php-worker` container. It will be similar as like PHP-FPM Containter.
|
||||||
|
<br>
|
||||||
|
a) open the `docker-compose.yml` file
|
||||||
|
<br>
|
||||||
|
b) add a new service container by simply copy-paste this section below PHP-FPM container
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
php-worker:
|
||||||
|
build:
|
||||||
|
context: ./php-fpm
|
||||||
|
dockerfile: Dockerfile-70 # or Dockerfile-56, choose your PHP-FPM container setting
|
||||||
|
volumes_from:
|
||||||
|
- applications
|
||||||
|
command: php artisan queue:work
|
||||||
|
```
|
||||||
|
2 - Start everything up
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d php-worker
|
||||||
|
```
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="Use-Redis"></a>
|
<a name="Use-Redis"></a>
|
||||||
### Use Redis
|
### Use Redis
|
||||||
@ -1524,6 +1557,45 @@ It should be like this:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Install-Linuxbrew"></a>
|
||||||
|
### Install Linuxbrew
|
||||||
|
|
||||||
|
Linuxbrew is a package manager for Linux. It is the Linux version of MacOS Homebrew and can be found [here](http://linuxbrew.sh). To install Linuxbrew in the Workspace container:
|
||||||
|
|
||||||
|
1 - Open the `docker-compose.yml` file
|
||||||
|
|
||||||
|
2 - Search for the `INSTALL_LINUXBREW` argument under the Workspace Container and set it to `true`
|
||||||
|
|
||||||
|
It should be like this:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
workspace:
|
||||||
|
build:
|
||||||
|
context: ./workspace
|
||||||
|
args:
|
||||||
|
- INSTALL_LINUXBREW=true
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
3 - Re-build the container `docker-compose build workspace`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Common-Aliases"></a>
|
||||||
|
<br>
|
||||||
|
### Common Terminal Aliases
|
||||||
|
When you start your docker container, Laradock will copy the `aliases.sh` file located in the `laradock/workspace` directory and add sourcing to the container `~/.bashrc` file.
|
||||||
|
|
||||||
|
You are free to modify the `aliases.sh` as you see fit, adding your own aliases (or function macros) to suit your requirements.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="Install-Aerospike-Extension"></a>
|
<a name="Install-Aerospike-Extension"></a>
|
||||||
### Install Aerospike extension
|
### Install Aerospike extension
|
||||||
@ -1593,16 +1665,41 @@ It should be like this:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<a name="Install-Deployer"></a>
|
||||||
|
### Install Deployer (Deployment tool for PHP)
|
||||||
|
|
||||||
|
1 - Open the `docker-compose.yml` file
|
||||||
|
<br>
|
||||||
|
2 - Search for the `INSTALL_DEPLOYER` argument under the Workspace Container
|
||||||
|
<br>
|
||||||
|
3 - Set it to `true`
|
||||||
|
<br>
|
||||||
|
|
||||||
|
It should be like this:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
workspace:
|
||||||
|
build:
|
||||||
|
context: ./workspace
|
||||||
|
args:
|
||||||
|
- INSTALL_DEPLOYER=true
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
4 - Re-build the containers `docker-compose build workspace`
|
||||||
|
|
||||||
|
####[Deployer Documentation Here](https://deployer.org/docs)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
||||||
<a name="debugging"></a>
|
<a name="debugging"></a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### PHPStorm
|
### PHPStorm
|
||||||
Remote debug Laravel web and phpunit tests.
|
Remote debug Laravel web and phpunit tests.
|
||||||
|
|
||||||
@ -1667,6 +1764,12 @@ Make sure the ports for the services that you are trying to run (22, 80, 443, 33
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### The time in my services does not match the current time
|
||||||
|
|
||||||
|
1. Make sure you've [changed the timezone](#Change-the-timezone).
|
||||||
|
2. Stop and rebuild the containers (`docker-compose up -d --build <services>`)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### I get Mysql connection refused
|
#### I get Mysql connection refused
|
||||||
@ -1760,7 +1863,8 @@ For special help with Docker and/or Laravel, you can schedule a live call with t
|
|||||||
- [Mahmoud Zalt](https://github.com/Mahmoudz) (mahmoudz) [ [Twitter](https://twitter.com/Mahmoud_Zalt) | [Personal Site](http://zalt.me) | [Linkedin](https://www.linkedin.com/in/mahmoudzalt) ]
|
- [Mahmoud Zalt](https://github.com/Mahmoudz) (mahmoudz) [ [Twitter](https://twitter.com/Mahmoud_Zalt) | [Personal Site](http://zalt.me) | [Linkedin](https://www.linkedin.com/in/mahmoudzalt) ]
|
||||||
- [Bo-Yi Wu](https://github.com/appleboy) (appleboy)
|
- [Bo-Yi Wu](https://github.com/appleboy) (appleboy)
|
||||||
- [Philippe Trépanier](https://github.com/philtrep) (philtrep)
|
- [Philippe Trépanier](https://github.com/philtrep) (philtrep)
|
||||||
- YOU?! Join Us.
|
- [Mike Erickson](https://github.com/mikeerickson) (mikeerickson)
|
||||||
|
- Join Us!
|
||||||
|
|
||||||
**Amazing Contributors:**
|
**Amazing Contributors:**
|
||||||
|
|
||||||
|
@ -26,6 +26,8 @@ services:
|
|||||||
- COMPOSER_GLOBAL_INSTALL=false
|
- COMPOSER_GLOBAL_INSTALL=false
|
||||||
- INSTALL_WORKSPACE_SSH=false
|
- INSTALL_WORKSPACE_SSH=false
|
||||||
- INSTALL_LARAVEL_ENVOY=false
|
- INSTALL_LARAVEL_ENVOY=false
|
||||||
|
- INSTALL_DEPLOYER=false
|
||||||
|
- INSTALL_LINUXBREW=false
|
||||||
- PUID=1000
|
- PUID=1000
|
||||||
- PGID=1000
|
- PGID=1000
|
||||||
- NODE_VERSION=stable
|
- NODE_VERSION=stable
|
||||||
@ -51,8 +53,10 @@ services:
|
|||||||
- INSTALL_MONGO=false
|
- INSTALL_MONGO=false
|
||||||
- INSTALL_ZIP_ARCHIVE=false
|
- INSTALL_ZIP_ARCHIVE=false
|
||||||
- INSTALL_BCMATH=false
|
- INSTALL_BCMATH=false
|
||||||
|
- INSTALL_PHPREDIS=false
|
||||||
- INSTALL_MEMCACHED=false
|
- INSTALL_MEMCACHED=false
|
||||||
- INSTALL_OPCACHE=false
|
- INSTALL_OPCACHE=false
|
||||||
|
- INSTALL_EXIF=false
|
||||||
- INSTALL_AEROSPIKE_EXTENSION=false
|
- INSTALL_AEROSPIKE_EXTENSION=false
|
||||||
- CODEIGNITER=false
|
- CODEIGNITER=false
|
||||||
dockerfile: Dockerfile-70
|
dockerfile: Dockerfile-70
|
||||||
@ -135,7 +139,7 @@ services:
|
|||||||
mariadb:
|
mariadb:
|
||||||
build: ./mariadb
|
build: ./mariadb
|
||||||
volumes:
|
volumes:
|
||||||
- mysql:/var/lib/mysql
|
- mariadb:/var/lib/mysql
|
||||||
ports:
|
ports:
|
||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
environment:
|
environment:
|
||||||
|
@ -15,6 +15,8 @@ server {
|
|||||||
try_files $uri /index.php =404;
|
try_files $uri /index.php =404;
|
||||||
fastcgi_pass php-upstream;
|
fastcgi_pass php-upstream;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
|
fastcgi_buffers 16 16k;
|
||||||
|
fastcgi_buffer_size 32k;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,17 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
|||||||
docker-php-ext-enable xdebug \
|
docker-php-ext-enable xdebug \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# PHP REDIS EXTENSION FOR PHP 7.0
|
||||||
|
#####################################
|
||||||
|
ARG INSTALL_PHPREDIS=false
|
||||||
|
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||||
|
# Install Php Redis Extension
|
||||||
|
pecl install -o -f redis \
|
||||||
|
&& rm -rf /tmp/pear \
|
||||||
|
&& docker-php-ext-enable redis \
|
||||||
|
;fi
|
||||||
|
|
||||||
# Copy xdebug configration for remote debugging
|
# Copy xdebug configration for remote debugging
|
||||||
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||||
|
|
||||||
@ -117,6 +128,18 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
|
|||||||
&& docker-php-ext-enable memcached \
|
&& docker-php-ext-enable memcached \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Exif:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_EXIF=false
|
||||||
|
RUN if [ ${INSTALL_EXIF} = true ]; then \
|
||||||
|
# Enable Exif PHP extentions requirements
|
||||||
|
docker-php-ext-install exif && \
|
||||||
|
docker-php-ext-enable exif \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# PHP Aerospike:
|
# PHP Aerospike:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
version: '2'
|
|
||||||
|
|
||||||
services:
|
|
||||||
|
|
||||||
### Workspace Utilities Container ###########################
|
|
||||||
|
|
||||||
workspace:
|
|
||||||
build:
|
|
||||||
context: ./workspace
|
|
||||||
args:
|
|
||||||
- INSTALL_XDEBUG=false
|
|
||||||
- INSTALL_MONGO=false
|
|
||||||
- INSTALL_NODE=false
|
|
||||||
- INSTALL_YARN=false
|
|
||||||
- INSTALL_DRUSH=false
|
|
||||||
- INSTALL_AEROSPIKE_EXTENSION=false
|
|
||||||
- COMPOSER_GLOBAL_INSTALL=false
|
|
||||||
- INSTALL_WORKSPACE_SSH=false
|
|
||||||
- PUID=1000
|
|
||||||
- PGID=1000
|
|
||||||
- NODE_VERSION=stable
|
|
||||||
volumes_from:
|
|
||||||
- volumes_source
|
|
||||||
ports:
|
|
||||||
- "22:22"
|
|
||||||
tty: true
|
|
||||||
|
|
||||||
### PHP-FPM Container #######################################
|
|
||||||
|
|
||||||
php-fpm:
|
|
||||||
build:
|
|
||||||
context: ./php-fpm
|
|
||||||
args:
|
|
||||||
- INSTALL_XDEBUG=false
|
|
||||||
- INSTALL_MONGO=false
|
|
||||||
- INSTALL_ZIP_ARCHIVE=false
|
|
||||||
- INSTALL_MEMCACHED=false
|
|
||||||
- INSTALL_OPCACHE=false
|
|
||||||
- INSTALL_AEROSPIKE_EXTENSION=false
|
|
||||||
dockerfile: Dockerfile-70
|
|
||||||
volumes_from:
|
|
||||||
- volumes_source
|
|
||||||
expose:
|
|
||||||
- "9000"
|
|
||||||
links:
|
|
||||||
- workspace
|
|
||||||
|
|
||||||
### Application Code Container ######################
|
|
||||||
|
|
||||||
volumes_source:
|
|
||||||
image: tianon/true
|
|
||||||
volumes:
|
|
||||||
- ../:/var/www
|
|
||||||
|
|
||||||
### Databases Data Container ################################
|
|
||||||
|
|
||||||
volumes_data:
|
|
||||||
image: tianon/true
|
|
||||||
volumes:
|
|
||||||
# - ./data/mysql:/var/lib/mysql
|
|
||||||
|
|
||||||
### Add All your Software Containers below ###############################
|
|
@ -74,12 +74,34 @@ RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
|
|||||||
composer global install \
|
composer global install \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
# Export composer vendor path
|
||||||
|
RUN echo "" >> ~/.bashrc && \
|
||||||
|
echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Crontab
|
# Crontab
|
||||||
#####################################
|
#####################################
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
COPY ./crontab /var/spool/cron/crontabs
|
COPY ./crontab /etc/cron.d
|
||||||
|
RUN chmod -R 644 /etc/cron.d
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# User Aliases
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
USER laradock
|
||||||
|
COPY ./aliases.sh /home/laradock/aliases.sh
|
||||||
|
RUN echo "" >> ~/.bashrc && \
|
||||||
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
|
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
||||||
|
echo "" >> ~/.bashrc
|
||||||
|
|
||||||
|
USER root
|
||||||
|
RUN echo "" >> ~/.bashrc && \
|
||||||
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
|
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
||||||
|
echo "" >> ~/.bashrc
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# xDebug:
|
# xDebug:
|
||||||
@ -286,9 +308,53 @@ ENV INSTALL_LARAVEL_ENVOY ${INSTALL_LARAVEL_ENVOY}
|
|||||||
|
|
||||||
RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
||||||
# Install the Laravel Envoy
|
# Install the Laravel Envoy
|
||||||
|
composer global require "laravel/envoy=~1.0" \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Deployer:
|
||||||
|
#####################################
|
||||||
|
USER laradock
|
||||||
|
|
||||||
|
ARG INSTALL_DEPLOYER=false
|
||||||
|
ENV INSTALL_DEPLOYER ${INSTALL_DEPLOYER}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_DEPLOYER} = true ]; then \
|
||||||
|
# Install the Deployer
|
||||||
|
composer global require "deployer/deployer" \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Linuxbrew:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG INSTALL_LINUXBREW=true
|
||||||
|
ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||||
|
|
||||||
|
# Preparation
|
||||||
|
apt-get update && \
|
||||||
|
apt-get upgrade -y && \
|
||||||
|
apt-get install -y build-essential make cmake scons curl git \
|
||||||
|
ruby autoconf automake autoconf-archive \
|
||||||
|
gettext libtool flex bison \
|
||||||
|
libbz2-dev libcurl4-openssl-dev \
|
||||||
|
libexpat-dev libncurses-dev && \
|
||||||
|
|
||||||
|
# Install the Linuxbrew
|
||||||
|
git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
|
||||||
|
|
||||||
echo "" >> ~/.bashrc && \
|
echo "" >> ~/.bashrc && \
|
||||||
echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \
|
echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
|
||||||
&& composer global require "laravel/envoy=~1.0" \
|
|
||||||
|
# Setup linuxbrew
|
||||||
|
echo 'export LINUXBREWHOME="$HOME/.linuxbrew"' >> ~/.bashrc && \
|
||||||
|
echo 'export PATH="$LINUXBREWHOME/bin:$PATH"' >> ~/.bashrc && \
|
||||||
|
echo 'export MANPATH="$LINUXBREWHOME/man:$MANPATH"' >> ~/.bashrc && \
|
||||||
|
echo 'export PKG_CONFIG_PATH="$LINUXBREWHOME/lib64/pkgconfig:$LINUXBREWHOME/lib/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
|
||||||
|
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
71
workspace/aliases.sh
Normal file
71
workspace/aliases.sh
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
# Colors used for status updates
|
||||||
|
ESC_SEQ="\x1b["
|
||||||
|
COL_RESET=$ESC_SEQ"39;49;00m"
|
||||||
|
COL_RED=$ESC_SEQ"31;01m"
|
||||||
|
COL_GREEN=$ESC_SEQ"32;01m"
|
||||||
|
COL_YELLOW=$ESC_SEQ"33;01m"
|
||||||
|
COL_BLUE=$ESC_SEQ"34;01m"
|
||||||
|
COL_MAGENTA=$ESC_SEQ"35;01m"
|
||||||
|
COL_CYAN=$ESC_SEQ"36;01m"
|
||||||
|
|
||||||
|
# Commonly Used Aliases
|
||||||
|
alias ..="cd .."
|
||||||
|
alias c="clear"
|
||||||
|
alias cla="clear && ls -l"
|
||||||
|
alias cll="clear && ls -la"
|
||||||
|
alias cls="clear && ls"
|
||||||
|
alias code="cd /var/www"
|
||||||
|
alias ea="vi ~/aliases"
|
||||||
|
alias g="gulp"
|
||||||
|
alias home="cd ~"
|
||||||
|
alias npm-global="npm list -g --depth 0"
|
||||||
|
alias ra="reload"
|
||||||
|
alias reload="source ~/.aliases && echo \"$COL_GREEN ==> Aliases Reloaded... $COL_RESET \n \""
|
||||||
|
alias run="npm run"
|
||||||
|
alias tree="xtree"
|
||||||
|
|
||||||
|
# Laravel / PHP Alisases
|
||||||
|
alias art="php artisan"
|
||||||
|
alias artisan="php artisan"
|
||||||
|
alias cdump="composer dump-autoload -o"
|
||||||
|
alias composer:dump="composer dump-autoload -o"
|
||||||
|
alias db:reset="php artisan migrate:reset && php artisan migrate --seed"
|
||||||
|
alias migrate="php artisan migrate"
|
||||||
|
alias seed="php artisan:seed"
|
||||||
|
alias phpunit="./vendor/bin/phpunit"
|
||||||
|
|
||||||
|
|
||||||
|
# requires installation of 'https://www.npmjs.com/package/npms-cli'
|
||||||
|
alias npms="npms search"
|
||||||
|
|
||||||
|
# requires installation of 'https://www.npmjs.com/package/package-menu-cli'
|
||||||
|
alias pm="package-menu"
|
||||||
|
|
||||||
|
# requires installation of 'https://www.npmjs.com/package/pkg-version-cli'
|
||||||
|
alias pv="package-version"
|
||||||
|
|
||||||
|
# requires installation of 'https://github.com/sindresorhus/latest-version-cli'
|
||||||
|
alias lv="latest-version"
|
||||||
|
|
||||||
|
# git aliases
|
||||||
|
alias gaa="git add ."
|
||||||
|
alias gd="git --no-pager diff"
|
||||||
|
alias git-revert="git reset --hard && git clean -df"
|
||||||
|
alias gs="git status"
|
||||||
|
alias whoops="git reset --hard && git clean -df"
|
||||||
|
|
||||||
|
|
||||||
|
# Create a new directory and enter it
|
||||||
|
function mkd() {
|
||||||
|
mkdir -p "$@" && cd "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
function md() {
|
||||||
|
mkdir -p "$@" && cd "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
function xtree {
|
||||||
|
find ${1:-.} -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
|
||||||
|
}
|
1
workspace/crontab/laradock
Normal file
1
workspace/crontab/laradock
Normal file
@ -0,0 +1 @@
|
|||||||
|
* * * * * laradock php /var/www/artisan schedule:run >> /dev/null 2>&1
|
@ -1 +0,0 @@
|
|||||||
* * * * * php /var/www/artisan schedule:run >> /dev/null 2>&1
|
|
Reference in New Issue
Block a user