-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'steemit:master' into bookmarks-for-pr
- Loading branch information
Showing
18 changed files
with
248 additions
and
39 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM phusion/baseimage:0.11 | ||
|
||
|
||
ENV ENVIRONMENT DEV | ||
ENV LOG_LEVEL INFO | ||
ENV LANG en_US.UTF-8 | ||
ENV LC_ALL en_US.UTF-8 | ||
ENV PIPENV_VENV_IN_PROJECT 1 | ||
ARG SOURCE_COMMIT | ||
ENV SOURCE_COMMIT ${SOURCE_COMMIT} | ||
ARG SCHEMA_HASH | ||
ENV SCHEMA_HASH adb5cd9b | ||
#ENV SCHEMA_HASH ${SCHEMA_HASH} | ||
ARG DOCKER_TAG | ||
ENV DOCKER_TAG ${DOCKER_TAG} | ||
|
||
ENV APP_ROOT /app | ||
ENV WSGI_APP ${APP_ROOT}/hive/server/serve.py | ||
ENV HTTP_SERVER_PORT 8080 | ||
|
||
RUN \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
awscli \ | ||
build-essential \ | ||
daemontools \ | ||
libffi-dev \ | ||
libmysqlclient-dev \ | ||
libssl-dev \ | ||
make \ | ||
liblz4-tool \ | ||
postgresql \ | ||
postgresql-contrib \ | ||
python3 \ | ||
python3-dev \ | ||
python3-pip \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
runit \ | ||
s3cmd \ | ||
libpcre3 \ | ||
libpcre3-dev | ||
|
||
RUN \ | ||
pip3 install --upgrade pip setuptools | ||
|
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,61 @@ | ||
#/bin/bash | ||
|
||
set -xe | ||
|
||
container_name=dev-hivemind-env | ||
|
||
run() { | ||
tag=$1 | ||
network=$2 | ||
|
||
if [ "${tag}" = "" ]; then | ||
tag=dev-env | ||
fi | ||
|
||
if [ "${network}" = "" ]; then | ||
network=bridge | ||
fi | ||
|
||
docker run -itd --rm \ | ||
--name ${container_name} \ | ||
-v $(pwd):/project \ | ||
--env-file $(pwd)/.env \ | ||
--workdir /project \ | ||
--network ${network} \ | ||
steemit/hivemind:${tag} \ | ||
/bin/bash | ||
} | ||
|
||
cli() { | ||
docker exec -it ${container_name} /bin/bash | ||
} | ||
|
||
stop() { | ||
docker stop ${container_name} | ||
} | ||
|
||
main_func() { | ||
op=$1 | ||
tag=$2 | ||
network=$3 | ||
|
||
case ${op} in | ||
run) | ||
run $tag $network | ||
cli | ||
;; | ||
cli) | ||
cli | ||
;; | ||
stop) | ||
stop | ||
;; | ||
*) | ||
echo "Unknown Command" | ||
exit 1 | ||
;; | ||
esac | ||
} | ||
|
||
main_func $1 $2 $3 | ||
|
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
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
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
Oops, something went wrong.