Merge pull request #1 from laradock/master

跟进主干
This commit is contained in:
MyController 2017-05-31 13:39:13 +08:00 committed by GitHub
commit 5745a50d15
19 changed files with 168 additions and 14 deletions

View File

@ -25,6 +25,7 @@ A Docker PHP development environment that facilitates running **PHP** Apps on **
- [Winfried van Loon](https://github.com/winfried-van-loon) @winfried-van-loon
- [TJ Miller](https://github.com/sixlive) @sixlive
- [Yu-Lung Shao (Allen)](https://github.com/bestlong) @bestlong
- [Milan Urukalo](https://github.com/urukalo) @urukalo
- Join Us.
## License

View File

@ -8,5 +8,22 @@ MAINTAINER Patrick Artounian <partounian@gmail.com>
# Add volume for sessions to allow session persistence
VOLUME /sessions
#####################################
# SQL SERVER:
#####################################
USER root
ARG INSTALL_MSSQL=false
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \
set -xe \
&& apk --update add --no-cache --virtual .phpize-deps $PHPIZE_DEPS unixodbc unixodbc-dev \
&& pecl channel-update pecl.php.net \
&& pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \
&& echo "extension=sqlsrv.so" > /usr/local/etc/php/conf.d/20-sqlsrv.ini \
&& echo "extension=pdo_sqlsrv.so" > /usr/local/etc/php/conf.d/20-pdo_sqlsrv.ini \
;fi
USER adminer
# We expose Adminer on port 8080 (Adminer's default)
EXPOSE 8080

View File

@ -28,6 +28,7 @@ services:
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
- INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH}
- INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY}
- INSTALL_LARAVEL_INSTALLER=${WORKSPACE_INSTALL_LARAVEL_INSTALLER}
- INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER}
- INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LINUXBREW}
- INSTALL_MC=${WORKSPACE_INSTALL_MC}
@ -440,7 +441,10 @@ services:
### Adminer Container ####################################
adminer:
build: ./adminer
build:
context: ./adminer
args:
- INSTALL_MSSQL=${ADM_INSTALL_MSSQL}
ports:
- "${ADM_PORT}:8080"
depends_on:
@ -563,6 +567,7 @@ services:
- proxy2
### Jenkins ###################################################
jenkins:
build: ./jenkins
environment:
@ -578,6 +583,19 @@ services:
- frontend
- backend
### Laravel Echo Server #######################################
laravel-echo-server:
build:
context: ./laravel-echo-server
volumes:
- ./laravel-echo-server/laravel-echo-server.json:/app/laravel-echo-server.json:ro
ports:
- "${LARAVEL_ECHO_SERVER_PORT}:6001"
links:
- redis
networks:
- frontend
- backend
### Networks Setup ############################################

View File

@ -10,7 +10,7 @@ APPLICATION=../
### Data Path:
# For all storage systems.
DATA_SAVE_PATH=/tmp
DATA_SAVE_PATH=~/.laradock/data
### PHP version
# Applies to the Workspace and PHP-FPM containers (Does not apply to HHVM)
@ -41,6 +41,7 @@ WORKSPACE_INSTALL_V8JS=false
WORKSPACE_COMPOSER_GLOBAL_INSTALL=false
WORKSPACE_INSTALL_WORKSPACE_SSH=false
WORKSPACE_INSTALL_LARAVEL_ENVOY=false
WORKSPACE_INSTALL_LARAVEL_INSTALLER=false
WORKSPACE_INSTALL_DEPLOYER=false
WORKSPACE_INSTALL_LINUXBREW=false
WORKSPACE_INSTALL_MC=false
@ -161,6 +162,7 @@ MINIO_PORT=9000
### ADMINER ############################################################################################################
ADM_PORT=8080
ADM_INSTALL_MSSQL=false
### PHP MY ADMIN #######################################################################################################
@ -239,6 +241,10 @@ CADDY_HOST_HTTPS_PORT=443
CADDY_HOST_LOG_PATH=./logs/caddy
CADDY_CUSTOM_CADDYFILE=./caddy/Caddyfile
### LARAVEL ECHO SERVER ################################################################################################
LARAVEL_ECHO_SERVER_PORT=6001
##### TO BE CONTINUE .................................

0
jenkins/install-plugins.sh Normal file → Executable file
View File

0
jenkins/jenkins-support Normal file → Executable file
View File

0
jenkins/jenkins.sh Normal file → Executable file
View File

0
jenkins/plugins.sh Normal file → Executable file
View File

0
jenkins/publish.sh Normal file → Executable file
View File

0
jenkins/update-official-library.sh Normal file → Executable file
View File

View File

@ -0,0 +1,15 @@
FROM node:argon
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json /usr/src/app/
RUN npm install
# Bundle app source
COPY laravel-echo-server.json /usr/src/app/laravel-echo-server.json
EXPOSE 3000
CMD [ "npm", "start" ]

View File

@ -0,0 +1,19 @@
{
"authHost": "localhost",
"authEndpoint": "/broadcasting/auth",
"clients": [],
"database": "redis",
"databaseConfig": {
"redis": {
"port": "6379",
"host": "redis"
}
},
"devMode": true,
"host": null,
"port": "6001",
"protocol": "http",
"socketio": {},
"sslCertPath": "",
"sslKeyPath": ""
}

View File

@ -0,0 +1,12 @@
{
"name": "laravel-echo-server-docker",
"description": "Docker container for running laravel-echo-server",
"version": "0.0.1",
"license": "MIT",
"dependencies": {
"laravel-echo-server": "^1.2.8"
},
"scripts": {
"start": "laravel-echo-server start"
}
}

View File

@ -1,5 +1,5 @@
#wait for the SQL Server to come up
sleep 45s
sleep 45
#run the setup script to create the DB and the schema in the DB
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -d master -i setup.sql

View File

@ -1,2 +1,2 @@
#start SQL Server, start the script to create the DB and import the data, start the app
/opt/mssql/bin/sqlservr.sh & /usr/src/app/create_table.sh & tail -f /dev/null
/opt/mssql/bin/sqlservr & /usr/src/app/create_table.sh & tail -f /dev/null

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
#### halt script on error
set -e
set -xe
echo '##### Print docker version'
docker --version

View File

@ -117,13 +117,17 @@ COPY ./aliases.sh /home/laradock/aliases.sh
RUN echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
echo "" >> ~/.bashrc && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
USER root
RUN echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
echo "" >> ~/.bashrc && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
#####################################
# xDebug:
@ -186,7 +190,8 @@ ENV INSTALL_MONGO ${INSTALL_MONGO}
RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension
pecl install mongodb && \
echo "extension=mongodb.so" >> /etc/php/5.6/cli/conf.d/30-mongodb.ini \
echo "extension=mongodb.so" >> /etc/php/5.6/mods-available/mongodb.ini && \
ln -s /etc/php/5.6/mods-available/mongodb.ini /etc/php/5.6/cli/conf.d/30-mongodb.ini \
;fi
#####################################
@ -333,6 +338,23 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
composer global require "laravel/envoy=~1.0" \
;fi
#####################################
# Laravel Installer:
#####################################
USER root
ARG INSTALL_LARAVEL_INSTALLER=true
ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER}
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
# Install the Laravel Installer
echo "" >> ~/.bashrc && \
echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \
&& composer global require "laravel/installer" \
;fi
USER laradock
#####################################
# Deployer:
#####################################

View File

@ -117,13 +117,17 @@ COPY ./aliases.sh /home/laradock/aliases.sh
RUN echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
echo "" >> ~/.bashrc && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
USER root
RUN echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
echo "" >> ~/.bashrc && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
#####################################
# xDebug:
@ -186,7 +190,8 @@ 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/conf.d/30-mongodb.ini \
echo "extension=mongodb.so" >> /etc/php/7.0/mods-available/mongodb.ini && \
ln -s /etc/php/7.0/mods-available/mongodb.ini /etc/php/7.0/cli/conf.d/30-mongodb.ini \
;fi
#####################################
@ -350,6 +355,23 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
composer global require "laravel/envoy=~1.0" \
;fi
#####################################
# Laravel Installer:
#####################################
USER root
ARG INSTALL_LARAVEL_INSTALLER=true
ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER}
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
# Install the Laravel Installer
echo "" >> ~/.bashrc && \
echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \
&& composer global require "laravel/installer" \
;fi
USER laradock
#####################################
# Deployer:
#####################################

View File

@ -113,13 +113,17 @@ COPY ./aliases.sh /home/laradock/aliases.sh
RUN echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
echo "" >> ~/.bashrc && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
USER root
RUN echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
echo "" >> ~/.bashrc && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
#####################################
# xDebug:
@ -182,7 +186,8 @@ 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.1/cli/conf.d/30-mongodb.ini \
echo "extension=mongodb.so" >> /etc/php/7.1/mods-available/mongodb.ini && \
ln -s /etc/php/7.1/mods-available/mongodb.ini /etc/php/7.1/cli/conf.d/30-mongodb.ini \
;fi
#####################################
@ -350,6 +355,23 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
composer global require "laravel/envoy=~1.0" \
;fi
#####################################
# Laravel Installer:
#####################################
USER root
ARG INSTALL_LARAVEL_INSTALLER=true
ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER}
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
# Install the Laravel Installer
echo "" >> ~/.bashrc && \
echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \
&& composer global require "laravel/installer" \
;fi
USER laradock
#####################################
# Deployer:
#####################################