-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial, sort of over engineered version (#1)
* fix tests, use table as a pool <eugh> * fix tests and linting * sort files by largest first * support schema:tables input; * make the schema directory if it does not exist * update parallel-process * update Dockerfile to latest * remove mkdir section, todo: add injected filesystem * allow older yaml versions * update composer version, some fixes
- Loading branch information
Harry Bragg
authored
Aug 9, 2018
1 parent
f010fe5
commit c7642c3
Showing
49 changed files
with
2,176 additions
and
1,161 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
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,14 +1,37 @@ | ||
FROM php:7.1-alpine | ||
FROM composer AS build | ||
|
||
WORKDIR /app | ||
COPY src /app/src | ||
COPY composer.json /app/composer.json | ||
COPY composer.lock /app/composer.lock | ||
|
||
RUN composer install --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader --prefer-dist | ||
|
||
FROM graze/php-alpine:7.2 AS run | ||
|
||
RUN set +xe \ | ||
&& apk add --no-cache \ | ||
mariadb-client | ||
|
||
WORKDIR /app | ||
COPY --from=build /app/src /app/src | ||
COPY --from=build /app/vendor /app/vendor | ||
COPY bin /app/bin | ||
COPY src /app/src | ||
COPY vendor /app/vendor | ||
|
||
VOLUME ["/seed", "/app/config"] | ||
ARG BUILD_DATE | ||
ARG VCS_REF | ||
|
||
LABEL org.label-schema.schema-version="1.0" \ | ||
org.label-schema.vendor="graze" \ | ||
org.label-schema.name="morphism" \ | ||
org.label-schema.description="seed your databases" \ | ||
org.label-schema.vcs-url="https://github.com/graze/sprout" \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.build-date=$BUILD_DATE \ | ||
maintainer="developers@graze.com" \ | ||
license="MIT" | ||
|
||
VOLUME ["/app/config", "/seed"] | ||
|
||
ENTRYPOINT ["php", "/app/bin/sprout"] | ||
CMD ["list"] |
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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
i=0 | ||
while ! nc "$1" "$2" >/dev/null 2>&1 < /dev/null; do | ||
i=`expr $i + 1` | ||
if [ $i -ge 50 ]; then | ||
echo "$(date) - $1:$2 still not reachable, giving up" | ||
exit 1 | ||
fi | ||
echo "$(date) - waiting for $1:$2..." | ||
sleep 1 | ||
done | ||
echo "$1 connection established" |
Oops, something went wrong.