From 894cb6ea270db0f4975156182e0af1638d729664 Mon Sep 17 00:00:00 2001 From: Thor Erik Lie Date: Thu, 23 Mar 2017 11:51:59 +0100 Subject: [PATCH 1/4] :bug: fix yarn again after #662 reverted it #706 --- docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 97c9e004..a824ffbf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,7 @@ services: - PUID=${WORKSPACE_PUID} - PGID=${WORKSPACE_PGID} - NODE_VERSION=${WORKSPACE_NODE_VERSION} - - YARN_VERSION=${WORKSPACE_TIMEZONE} + - YARN_VERSION=${WORKSPACE_YARN_VERSION} - TZ=${WORKSPACE_TIMEZONE} volumes_from: - applications @@ -57,7 +57,7 @@ services: - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED} - INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE} - INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF} - - INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_INSTALL_AEROSPIKE_EXTENSION} + - INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_INSTALL_AEROSPIKE_EXTENSION} - INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI} - INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER} - INSTALL_INTL=${PHP_FPM_INSTALL_INTL} @@ -72,7 +72,7 @@ services: - "dockerhost:${DOCKER_HOST_IP}" environment: - PHP_IDE_CONFIG=${PHP_IDE_CONFIG} - + ### PHP Worker Container ##################################### php-worker: build: From 6b61c7d4544453e4214c87f755a8aef6a506f5c4 Mon Sep 17 00:00:00 2001 From: Ignacio Cabrera Date: Fri, 24 Mar 2017 12:31:38 -0300 Subject: [PATCH 2/4] adding MSSQL support --- docker-compose.yml | 16 ++++++++++++++++ env-example | 6 +++++- mssql/Dockerfile | 21 +++++++++++++++++++++ mssql/create_table.sh | 5 +++++ mssql/entrypoint.sh | 2 ++ mssql/setup.sql | 4 ++++ 6 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 mssql/Dockerfile create mode 100644 mssql/create_table.sh create mode 100644 mssql/entrypoint.sh create mode 100644 mssql/setup.sql diff --git a/docker-compose.yml b/docker-compose.yml index 97c9e004..ab03d106 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -156,6 +156,20 @@ services: ports: - "${MYSQL_PORT}:3306" +### MsSQL Container ######################################### + + mssql: + build: + context: ./mssql + environment: + - MSSQL_DATABASE=${MSSQL_DATABASE} + - SA_PASSWORD=${MSSQL_PASSWORD} + - ACCEPT_EULA=Y + volumes: + - mssql:/var/lib/mysql + ports: + - "${MSSQL_PORT}:1433" + ### MariaDB Container ####################################### mariadb: @@ -381,6 +395,8 @@ services: volumes: mysql: driver: "local" + mssql: + driver: "local" postgres: driver: "local" memcached: diff --git a/env-example b/env-example index 4405222f..e1d1efa1 100644 --- a/env-example +++ b/env-example @@ -69,13 +69,17 @@ MYSQL_PASSWORD=secret MYSQL_PORT=3306 MYSQL_ROOT_PASSWORD=root +### MSSQL Container +MSSQL_DATABASE=homestead +MSSQL_PASSWORD=yourStrong(!)Password +MSSQL_PORT=1433 + ### MARIADB Container MARIADB_DATABASE=default MARIADB_USER=default MARIADB_PASSWORD=secret MARIADB_PORT=3306 - ### POSTGRES Container POSTGRES_DB=default POSTGRES_USER=default diff --git a/mssql/Dockerfile b/mssql/Dockerfile new file mode 100644 index 00000000..fd9f0761 --- /dev/null +++ b/mssql/Dockerfile @@ -0,0 +1,21 @@ +FROM microsoft/mssql-server-linux + +# Create config directory +# an set it as WORKDIR +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app + +# Bundle app source +COPY . /usr/src/app + +RUN chmod +x /usr/src/app/create_table.sh + +ENV MSSQL_DATABASE=$MSSQL_DATABASE +ENV ACCEPT_EULA=Y +ENV SA_PASSWORD=$MSSQL_PASSWORD + +VOLUME /var/opt/mssql + +EXPOSE 1433 + +CMD /bin/bash ./entrypoint.sh \ No newline at end of file diff --git a/mssql/create_table.sh b/mssql/create_table.sh new file mode 100644 index 00000000..f0c1a7c6 --- /dev/null +++ b/mssql/create_table.sh @@ -0,0 +1,5 @@ +#wait for the SQL Server to come up +sleep 45s + +#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 \ No newline at end of file diff --git a/mssql/entrypoint.sh b/mssql/entrypoint.sh new file mode 100644 index 00000000..e3835130 --- /dev/null +++ b/mssql/entrypoint.sh @@ -0,0 +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 \ No newline at end of file diff --git a/mssql/setup.sql b/mssql/setup.sql new file mode 100644 index 00000000..f453c778 --- /dev/null +++ b/mssql/setup.sql @@ -0,0 +1,4 @@ +CREATE DATABASE $(MSSQL_DATABASE); +GO +USE $(MSSQL_DATABASE); +GO \ No newline at end of file From 2e86243d884dbe3681b115c5ec3e0d6609a291f0 Mon Sep 17 00:00:00 2001 From: Ignacio Cabrera Date: Fri, 24 Mar 2017 13:49:38 -0300 Subject: [PATCH 3/4] Update docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index ab03d106..0895e3c3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -166,7 +166,7 @@ services: - SA_PASSWORD=${MSSQL_PASSWORD} - ACCEPT_EULA=Y volumes: - - mssql:/var/lib/mysql + - mssql:/var/opt/mssql ports: - "${MSSQL_PORT}:1433" From a0da2c0ea0113f04efc969eee93e5afab0418a37 Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Fri, 24 Mar 2017 19:54:36 -0400 Subject: [PATCH 4/4] Update readme Add @zeroc0d3 to the maintainers team :) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9cad0e80..4d9e5f8a 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ Laradock is a Docker PHP development environment that facilitate running **PHP** - [Bo-Yi Wu](https://github.com/appleboy) (appleboy) [ [Twitter](https://twitter.com/appleboy) ] - [Philippe Trépanier](https://github.com/philtrep) (philtrep) - [Mike Erickson](https://github.com/mikeerickson) (mikeerickson) -- Join Us! +- [Dwi Fahni Denni](https://github.com/zeroc0d3) (zeroc0d3) +- Join Us. **Amazing Contributors:**