-
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.
Add Docker + API design scripts (#20)
* Add Docker + API design scripts * Add Docker + API design scripts * Fix wront script file * Lock dependncies + Fix unquoted strings * Release 0.5.1: Dependent package versions added + Fix unquoted strings
- Loading branch information
Showing
8 changed files
with
47 additions
and
11 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
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,7 @@ | ||
#!/bin/bash | ||
|
||
API="$1"; | ||
|
||
[ $# -ne 1 ] && { echo "Usage: pass API service name as argument"; exit 1;} | ||
|
||
npx spectral lint "doc/${API}.yaml"; |
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,9 @@ | ||
#!/bin/bash | ||
|
||
API="$1"; | ||
|
||
[ $# -ne 1 ] && { echo "Usage: pass API service name as argument"; exit 1;} | ||
|
||
npx redoc-cli bundle "doc/${API}.yaml"; | ||
rm -f "doc/${API}.html" && mv redoc-static.html "doc/${API}.html"; | ||
exit 0; |
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,10 @@ | ||
#!/bin/sh | ||
|
||
NODE_ENV=$1 | ||
NPM_TOKEN=$2 | ||
SERVICE_PORT={{{scaffold_service_port}}}; | ||
APP_NAME={{{scaffold_docker_path}}}; | ||
|
||
|
||
docker build -t "$APP_NAME" --build-arg NODE_ENV=$NODE_ENV --build-arg SERVICE_PORT=$SERVICE_PORT --build-arg NPM_TOKEN=$NPM_TOKEN .; | ||
exit 0; |
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,4 @@ | ||
#!/bin/sh | ||
|
||
docker run -p 4021:4021 {{{scaffold_docker_path}}}:latest; | ||
exit 0; |
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