This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from openhie/ohie-420-docker-outside-of-docker
OHIE-420 docker outside of docker
- Loading branch information
Showing
27 changed files
with
665 additions
and
171 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# docker volume data folders | ||
**/data | ||
|
||
# cli client | ||
goinstant | ||
|
||
# vscode config | ||
.vscode | ||
|
||
# Docs | ||
docs | ||
|
||
# Dependency directories | ||
node_modules/ |
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 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"endOfLine": "lf", | ||
"htmlWhitespaceSensitivity": "css", | ||
"insertPragma": false, | ||
"jsxBracketSameLine": false, | ||
"jsxSingleQuote": false, | ||
"printWidth": 80, | ||
"proseWrap": "preserve", | ||
"quoteProps": "as-needed", | ||
"requirePragma": false, | ||
"semi": false, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "none", | ||
"useTabs": false, | ||
"vueIndentScriptAndStyle": false, | ||
"filepath": "/home/ryan/git/instant/instant.ts", | ||
"parser": "typescript" | ||
} |
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,27 @@ | ||
FROM node:lts | ||
|
||
WORKDIR /instant | ||
|
||
# install curl | ||
RUN apt-get update; apt-get install -y curl | ||
|
||
# install kubectl | ||
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl | ||
RUN chmod +x ./kubectl | ||
RUN mv ./kubectl /usr/local/bin/kubectl | ||
|
||
# install docker engine | ||
RUN curl -sSL https://get.docker.com/ | sh | ||
|
||
# install docker-compose binary | ||
RUN curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | ||
RUN chmod +x /usr/local/bin/docker-compose | ||
|
||
# install node deps | ||
ADD package.json . | ||
ADD yarn.lock . | ||
RUN yarn | ||
|
||
ADD . . | ||
|
||
ENTRYPOINT [ "yarn", "instant" ] |
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
composeFilePath=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) | ||
|
||
if [ "$1" == "init" ]; then | ||
docker-compose -f "$composeFilePath"/docker-compose-mongo.yml up -d | ||
docker-compose -p instant -f "$composeFilePath"/docker-compose-mongo.yml up -d | ||
|
||
# Set up the replica set | ||
"$composeFilePath"/initiateReplicaSet.sh | ||
|
||
docker-compose -f "$composeFilePath"/docker-compose.yml -f "$composeFilePath"/docker-compose.dev.yml -f "$composeFilePath"/importer/docker-compose.config.yml up -d | ||
docker-compose -p instant -f "$composeFilePath"/docker-compose.yml -f "$composeFilePath"/docker-compose.dev.yml -f "$composeFilePath"/importer/docker-compose.config.yml up -d | ||
elif [ "$1" == "up" ]; then | ||
docker-compose -f "$composeFilePath"/docker-compose-mongo.yml up -d | ||
docker-compose -p instant -f "$composeFilePath"/docker-compose-mongo.yml up -d | ||
|
||
# Wait for mongo replica set to be set up | ||
sleep 20 | ||
|
||
docker-compose -f "$composeFilePath"/docker-compose.yml up -d | ||
docker-compose -p instant -f "$composeFilePath"/docker-compose.yml up -d | ||
elif [ "$1" == "down" ]; then | ||
docker-compose -f "$composeFilePath"/docker-compose-mongo.yml -f "$composeFilePath"/docker-compose.yml -f "$composeFilePath"/docker-compose.dev.yml -f "$composeFilePath"/importer/docker-compose.config.yml stop | ||
docker-compose -p instant -f "$composeFilePath"/docker-compose-mongo.yml -f "$composeFilePath"/docker-compose.yml -f "$composeFilePath"/docker-compose.dev.yml -f "$composeFilePath"/importer/docker-compose.config.yml stop | ||
elif [ "$1" == "destroy" ]; then | ||
docker-compose -f "$composeFilePath"/docker-compose-mongo.yml -f "$composeFilePath"/docker-compose.yml -f "$composeFilePath"/docker-compose.dev.yml -f "$composeFilePath"/importer/docker-compose.config.yml down -v | ||
docker-compose -p instant -f "$composeFilePath"/docker-compose-mongo.yml -f "$composeFilePath"/docker-compose.yml -f "$composeFilePath"/docker-compose.dev.yml -f "$composeFilePath"/importer/docker-compose.config.yml down -v | ||
else | ||
echo "Valid options are: init, up, down, or destroy" | ||
fi |
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 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
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,6 @@ | ||
{ | ||
"id": "core", | ||
"name": "Core package", | ||
"description": "", | ||
"version": "" | ||
} |
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.