Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a92aba
commit f2f3822
Showing
12 changed files
with
212 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,2 @@ | ||
.idea/ | ||
bin/tests-all | ||
doc/ | ||
vendor/ | ||
.dockerignore | ||
.editorconfig | ||
.gitignore | ||
.travis.yml | ||
appveyor.yml | ||
composer.lock | ||
docker-compose.yml | ||
LICENSE | ||
README.md | ||
# ignore all by default | ||
* |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
PHP_VERSION ?= 7.2 | ||
|
||
.PHONY: dev | ||
dev: | ||
cp .env.dist .env | ||
|
||
.PHONY: build | ||
build: | ||
docker-compose build php${PHP_VERSION} | ||
|
||
.PHONY: install-deps | ||
install-deps: | ||
docker/run-task php${PHP_VERSION} composer install | ||
|
||
.PHONY: tests | ||
tests: | ||
docker/run-task php${PHP_VERSION} bin/tests | ||
|
||
.PHONY: clear-deps | ||
clear-deps: | ||
rm -rf vendor/ composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#!/bin/sh | ||
|
||
set -o nounset | ||
set -o errexit | ||
set -o xtrace | ||
|
||
DIR=$(dirname $0)/.. | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# To copy composer binary file | ||
FROM composer:1.8.5 as composer | ||
|
||
################################################################################ | ||
|
||
FROM php:7.1-alpine as php7.1 | ||
|
||
RUN apk add --no-cache \ | ||
autoconf \ | ||
g++\ | ||
git \ | ||
libssh2-dev \ | ||
make \ | ||
zlib-dev \ | ||
&& pecl install \ | ||
mongodb \ | ||
ssh2-1.1.2 | ||
|
||
RUN docker-php-ext-install \ | ||
zip \ | ||
&& docker-php-ext-enable \ | ||
mongodb \ | ||
ssh2 | ||
|
||
COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
ENV COMPOSER_HOME /var/cache/composer | ||
RUN mkdir /var/cache/composer \ | ||
&& chown 1000:1000 /var/cache/composer | ||
|
||
USER 1000 | ||
|
||
RUN composer global require "hirak/prestissimo" --prefer-dist | ||
|
||
WORKDIR /app | ||
|
||
################################################################################ | ||
|
||
FROM php:7.2-alpine as php7.2 | ||
|
||
RUN apk add --no-cache \ | ||
autoconf \ | ||
g++\ | ||
git \ | ||
libssh2-dev \ | ||
make \ | ||
zlib-dev \ | ||
&& pecl install \ | ||
mongodb \ | ||
ssh2-1.1.2 | ||
|
||
RUN docker-php-ext-install \ | ||
zip \ | ||
&& docker-php-ext-enable \ | ||
mongodb \ | ||
ssh2 | ||
|
||
COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
ENV COMPOSER_HOME /var/cache/composer | ||
RUN mkdir /var/cache/composer \ | ||
&& chown 1000:1000 /var/cache/composer | ||
|
||
USER 1000 | ||
|
||
RUN composer global require "hirak/prestissimo" --prefer-dist | ||
|
||
WORKDIR /app | ||
|
||
################################################################################ | ||
|
||
FROM php:7.3-alpine as php7.3 | ||
|
||
RUN apk add --no-cache \ | ||
autoconf \ | ||
g++\ | ||
git \ | ||
libssh2-dev \ | ||
make \ | ||
zlib-dev \ | ||
&& pecl install \ | ||
mongodb \ | ||
ssh2-1.1.2 | ||
|
||
RUN docker-php-ext-install \ | ||
zip \ | ||
&& docker-php-ext-enable \ | ||
mongodb \ | ||
ssh2 | ||
|
||
COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
ENV COMPOSER_HOME /var/cache/composer | ||
RUN mkdir /var/cache/composer \ | ||
&& chown 1000:1000 /var/cache/composer | ||
|
||
USER 1000 | ||
|
||
RUN composer global require "hirak/prestissimo" --prefer-dist | ||
|
||
WORKDIR /app |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
# Usage: run-task SERVICE [CMD...] | ||
|
||
set -o nounset | ||
|
||
# env var used by the `docker-compose` command | ||
COMPOSE_FILE="$(dirname $0)/docker-compose.yml" | ||
|
||
docker-compose run --rm "${@}" | ||
EXIT_CODE="${?}" | ||
|
||
# stop the other services linked to the task | ||
docker-compose down | ||
|
||
exit "${EXIT_CODE}" |