commit
f2420ec52c
@ -922,6 +922,26 @@ docker-compose up -d minio
|
||||
```
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-AWS"></a>
|
||||
## Use AWS
|
||||
|
||||
1 - Configure AWS:
|
||||
- make sure to add your SSH keys in aws/ssh_keys folder
|
||||
|
||||
2 - Run the Aws Container (`aws`) with the `docker-compose up` command. Example:
|
||||
|
||||
```bash
|
||||
docker-compose up -d aws
|
||||
```
|
||||
|
||||
3 - Access the aws container with `docker-compose exec aws bash`
|
||||
|
||||
4 - To start using eb cli inside the container, initiaze your project first by doing 'eb init'. Read the [aws eb cli](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-configuration.html) docs for more details.
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="CodeIgniter"></a>
|
||||
|
||||
@ -1660,3 +1680,7 @@ This error sometimes happens because your Laravel application isn't running on t
|
||||
2. Change the `DB_HOST` variable on env with the IP that you received from previous step.
|
||||
* Option B
|
||||
1. Change the `DB_HOST` value to the same name as the MySQL docker container. The Laradock docker-compose file currently has this as `mysql`
|
||||
|
||||
## I get stuck when building ngxinx on `fetch http://mirrors.aliyun.com/alpine/v3.5/main/x86_64/APKINDEX.tar.gz`
|
||||
|
||||
As stated on [#749](https://github.com/laradock/laradock/issues/749#issuecomment-293296687), removing the line `RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories` from `nginx/Dockerfile` solves the problem.
|
||||
|
@ -4,11 +4,14 @@ MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
|
||||
|
||||
ARG PHP_UPSTREAM_CONTAINER=php-fpm
|
||||
ARG PHP_UPSTREAM_PORT=9000
|
||||
ARG PHP_UPSTREAM_TIMEOUT=60
|
||||
|
||||
ENV WEB_PHP_SOCKET=${PHP_UPSTREAM_CONTAINER}:${PHP_UPSTREAM_PORT}
|
||||
|
||||
ENV WEB_DOCUMENT_ROOT=/var/www/
|
||||
|
||||
ENV WEB_PHP_TIMEOUT=${PHP_UPSTREAM_TIMEOUT}
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
WORKDIR /var/www/
|
||||
|
1
aws/.gitignore
vendored
Normal file
1
aws/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
./ssh_keys
|
17
aws/Dockerfile
Normal file
17
aws/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM python:slim
|
||||
|
||||
MAINTAINER melchabcede@gmail.com
|
||||
|
||||
RUN pip install --upgrade --no-cache-dir awsebcli
|
||||
RUN apt-get -yqq update && apt-get -yqq install git-all
|
||||
|
||||
#NOTE: make sure ssh keys are added to ssh_keys folder
|
||||
|
||||
RUN mkdir root/tmp_ssh
|
||||
COPY /ssh_keys/. /root/.ssh/
|
||||
RUN cd /root/.ssh && chmod 600 * && chmod 644 *.pub
|
||||
|
||||
# Set default work directory
|
||||
WORKDIR /var/www
|
||||
|
||||
|
@ -19,6 +19,7 @@ services:
|
||||
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
|
||||
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
|
||||
- INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
|
||||
- INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS}
|
||||
- INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL}
|
||||
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
|
||||
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
|
||||
@ -36,6 +37,7 @@ services:
|
||||
- INSTALL_SYMFONY=${WORKSPACE_INSTALL_SYMFONY}
|
||||
- INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON}
|
||||
- INSTALL_IMAGE_OPTIMIZERS=${WORKSPACE_INSTALL_IMAGE_OPTIMIZERS}
|
||||
- INSTALL_IMAGEMAGICK=${WORKSPACE_INSTALL_IMAGEMAGICK}
|
||||
- PUID=${WORKSPACE_PUID}
|
||||
- PGID=${WORKSPACE_PGID}
|
||||
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
|
||||
@ -80,6 +82,7 @@ services:
|
||||
- INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP}
|
||||
- INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE}
|
||||
- INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS}
|
||||
- INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK}
|
||||
dockerfile: "Dockerfile-${PHP_VERSION}"
|
||||
volumes_from:
|
||||
- applications
|
||||
@ -153,6 +156,7 @@ services:
|
||||
args:
|
||||
- PHP_UPSTREAM_CONTAINER=${APACHE_PHP_UPSTREAM_CONTAINER}
|
||||
- PHP_UPSTREAM_PORT=${APACHE_PHP_UPSTREAM_PORT}
|
||||
- PHP_UPSTREAM_TIMEOUT=${APACHE_PHP_UPSTREAM_TIMEOUT}
|
||||
volumes_from:
|
||||
- applications
|
||||
volumes:
|
||||
@ -213,7 +217,6 @@ services:
|
||||
- ${MYSQL_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
|
||||
ports:
|
||||
- "${MYSQL_PORT}:3306"
|
||||
user: "1000:50"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
@ -635,6 +638,16 @@ services:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
### AWS EB-CLI ####
|
||||
aws:
|
||||
build:
|
||||
context: ./aws
|
||||
volumes_from:
|
||||
- applications
|
||||
depends_on:
|
||||
- workspace
|
||||
tty: true
|
||||
|
||||
### Networks Setup ############################################
|
||||
|
||||
networks:
|
||||
|
@ -32,6 +32,7 @@ PHP_INTERPRETER=php-fpm
|
||||
WORKSPACE_INSTALL_XDEBUG=false
|
||||
WORKSPACE_INSTALL_SOAP=false
|
||||
WORKSPACE_INSTALL_MONGO=false
|
||||
WORKSPACE_INSTALL_PHPREDIS=false
|
||||
WORKSPACE_INSTALL_MSSQL=false
|
||||
WORKSPACE_INSTALL_NODE=false
|
||||
WORKSPACE_INSTALL_YARN=false
|
||||
@ -49,6 +50,7 @@ WORKSPACE_INSTALL_MC=false
|
||||
WORKSPACE_INSTALL_SYMFONY=false
|
||||
WORKSPACE_INSTALL_PYTHON=false
|
||||
WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false
|
||||
WORKSPACE_INSTALL_IMAGEMAGICK=false
|
||||
WORKSPACE_PUID=1000
|
||||
WORKSPACE_PGID=1000
|
||||
WORKSPACE_NODE_VERSION=stable
|
||||
@ -76,6 +78,7 @@ PHP_FPM_INSTALL_GHOSTSCRIPT=false
|
||||
PHP_FPM_INSTALL_LDAP=false
|
||||
PHP_FPM_INSTALL_SWOOLE=false
|
||||
PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=false
|
||||
PHP_FPM_INSTALL_IMAGEMAGICK=false
|
||||
|
||||
### NGINX ##############################################################################################################
|
||||
|
||||
@ -94,6 +97,7 @@ APACHE_HOST_LOG_PATH=./logs/apache2
|
||||
APACHE_SITES_PATH=./apache2/sites
|
||||
APACHE_PHP_UPSTREAM_CONTAINER=php-fpm
|
||||
APACHE_PHP_UPSTREAM_PORT=9000
|
||||
APACHE_PHP_UPSTREAM_TIMEOUT=60
|
||||
|
||||
### MYSQL ##############################################################################################################
|
||||
|
||||
|
@ -7,9 +7,6 @@ ADD nginx.conf /etc/nginx/
|
||||
ARG PHP_UPSTREAM_CONTAINER=php-fpm
|
||||
ARG PHP_UPSTREAM_PORT=9000
|
||||
|
||||
# fix a problem--#397, change application source from dl-cdn.alpinelinux.org to aliyun source.
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories
|
||||
|
||||
RUN apk update \
|
||||
&& apk upgrade \
|
||||
&& apk add --no-cache bash \
|
||||
|
@ -87,7 +87,7 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis Extension
|
||||
pecl install -o -f redis \
|
||||
printf "\n" | pecl install -o -f redis \
|
||||
&& rm -rf /tmp/pear \
|
||||
&& docker-php-ext-enable redis \
|
||||
;fi
|
||||
@ -269,6 +269,19 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ImageMagick:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get update -y && \
|
||||
apt-get install -y libmagickwand-dev imagemagick && \
|
||||
pecl install imagick && \
|
||||
docker-php-ext-enable imagick \
|
||||
;fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
@ -276,7 +289,7 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
#
|
||||
|
||||
ADD ./laravel.ini /usr/local/etc/php/conf.d
|
||||
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
#RUN rm -r /var/lib/apt/lists/*
|
||||
|
||||
|
@ -84,7 +84,7 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis Extension
|
||||
pecl install -o -f redis \
|
||||
printf "\n" | pecl install -o -f redis \
|
||||
&& rm -rf /tmp/pear \
|
||||
&& docker-php-ext-enable redis \
|
||||
;fi
|
||||
@ -293,6 +293,19 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ImageMagick:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get update -y && \
|
||||
apt-get install -y libmagickwand-dev imagemagick && \
|
||||
pecl install imagick && \
|
||||
docker-php-ext-enable imagick \
|
||||
;fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
@ -300,7 +313,7 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
#
|
||||
|
||||
ADD ./laravel.ini /usr/local/etc/php/conf.d/
|
||||
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
#RUN rm -r /var/lib/apt/lists/*
|
||||
|
||||
|
@ -78,13 +78,13 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP REDIS EXTENSION FOR PHP 7
|
||||
# PHP REDIS EXTENSION FOR PHP 7.0
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis Extension
|
||||
pecl install -o -f redis \
|
||||
printf "\n" | pecl install -o -f redis \
|
||||
&& rm -rf /tmp/pear \
|
||||
&& docker-php-ext-enable redis \
|
||||
;fi
|
||||
@ -300,6 +300,19 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ImageMagick:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get update -y && \
|
||||
apt-get install -y libmagickwand-dev imagemagick && \
|
||||
pecl install imagick && \
|
||||
docker-php-ext-enable imagick \
|
||||
;fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
@ -307,7 +320,7 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
#
|
||||
|
||||
ADD ./laravel.ini /usr/local/etc/php/conf.d
|
||||
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
#RUN rm -r /var/lib/apt/lists/*
|
||||
|
||||
|
@ -194,6 +194,19 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
ln -s /etc/php/5.6/mods-available/mongodb.ini /etc/php/5.6/cli/conf.d/30-mongodb.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP REDIS EXTENSION FOR PHP 5.6
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
ENV INSTALL_PHPREDIS ${INSTALL_PHPREDIS}
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis extension
|
||||
printf "\n" | pecl -q install -o -f redis && \
|
||||
echo "extension=redis.so" >> /etc/php/5.6/mods-available/redis.ini && \
|
||||
phpenmod redis \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Drush:
|
||||
#####################################
|
||||
@ -263,6 +276,9 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add PATH for node
|
||||
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
|
||||
|
||||
#####################################
|
||||
# YARN:
|
||||
#####################################
|
||||
@ -483,6 +499,16 @@ RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
||||
&& pip install --upgrade virtualenv \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ImageMagick:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get install -y --force-yes imagemagick php-imagick \
|
||||
;fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
|
@ -194,6 +194,19 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
ln -s /etc/php/7.0/mods-available/mongodb.ini /etc/php/7.0/cli/conf.d/30-mongodb.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP REDIS EXTENSION FOR PHP 7
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
ENV INSTALL_PHPREDIS ${INSTALL_PHPREDIS}
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis extension
|
||||
printf "\n" | pecl -q install -o -f redis && \
|
||||
echo "extension=redis.so" >> /etc/php/7.0/mods-available/redis.ini && \
|
||||
phpenmod redis \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Drush:
|
||||
#####################################
|
||||
@ -263,6 +276,9 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add PATH for node
|
||||
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
|
||||
|
||||
#####################################
|
||||
# YARN:
|
||||
#####################################
|
||||
@ -564,6 +580,16 @@ RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
||||
&& pip install --upgrade virtualenv \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ImageMagick:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get install -y --force-yes imagemagick php-imagick \
|
||||
;fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
|
@ -186,11 +186,24 @@ ARG INSTALL_MONGO=false
|
||||
ENV INSTALL_MONGO ${INSTALL_MONGO}
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
pecl install mongodb && \
|
||||
pecl -q install mongodb && \
|
||||
echo "extension=mongodb.so" >> /etc/php/7.1/mods-available/mongodb.ini && \
|
||||
ln -s /etc/php/7.1/mods-available/mongodb.ini /etc/php/7.1/cli/conf.d/30-mongodb.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP REDIS EXTENSION FOR PHP 7.1
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
ENV INSTALL_PHPREDIS ${INSTALL_PHPREDIS}
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis extension
|
||||
printf "\n" | pecl -q install -o -f redis && \
|
||||
echo "extension=redis.so" >> /etc/php/7.1/mods-available/redis.ini && \
|
||||
phpenmod redis \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Drush:
|
||||
#####################################
|
||||
@ -260,6 +273,10 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add PATH for node
|
||||
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
|
||||
|
||||
|
||||
#####################################
|
||||
# YARN:
|
||||
#####################################
|
||||
@ -569,6 +586,15 @@ RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
||||
&& pip install --upgrade virtualenv \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ImageMagick:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get install -y --force-yes imagemagick php-imagick \
|
||||
;fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user