-
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 build and start scripts to DRGON
- Loading branch information
1 parent
456edce
commit 4fb6bf4
Showing
9 changed files
with
84 additions
and
4 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,2 @@ | ||
DRGON_POSTGRES_PORT=XXXXXX | ||
DRGON_POSTGRES_ADMIN_PASSWORD=XXXXXX |
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,2 @@ | ||
src/node_modules/* | ||
.env |
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,5 +1,6 @@ | ||
FROM ubuntu:20.04 | ||
|
||
ARG DRGON_POSTGRES_ADMIN_PASSWORD="admin" | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN apt update | ||
|
||
|
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,34 @@ | ||
echo "Building DRGON... this should only take a few minutes." | ||
sh .env | ||
|
||
export ENV_LOADED_STATUS=$(echo $?) | ||
if [[ $ENV_LOADED_STATUS -ne 0 ]]; then | ||
echo "Error: Could not load .env file." | ||
exit 1 | ||
fi | ||
|
||
command -v docker | export DOCKER_INSTALLED=$? | ||
command -v docker-compose | export DOCKER_COMPOSE_INSTALLED=$? | ||
|
||
|
||
if [[ $DOCKER_INSTALLED -ne 0 ]]; then | ||
echo "Error: Docker is not installed on this machine." | ||
exit 1 | ||
fi | ||
|
||
if [[ $DOCKER_COMPOSE_INSTALLED -ne 0 ]]; then | ||
echo "Error: Docker Compose is not installed on this machine." | ||
exit 1 | ||
fi | ||
|
||
docker compose build --build-arg DRGON_POSTGRES_ADMIN_PASSWORD | ||
|
||
export BUILD_STATUS=$(echo $?) | ||
if [[ $BUILD_STATUS -ne 0 ]]; then | ||
echo "Error: DRGON did not build successfully." | ||
exit 1 | ||
fi | ||
|
||
echo "Done! You can start your DRGON instance by running the 'start.sh' script." | ||
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
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,34 @@ | ||
echo "Starting DRGON... this should only take a moment." | ||
sh .env | ||
|
||
export ENV_LOADED_STATUS=$(echo $?) | ||
if [[ $ENV_LOADED_STATUS -ne 0 ]]; then | ||
echo "Error: Could not load .env file." | ||
exit 1 | ||
fi | ||
|
||
command -v docker | export DOCKER_INSTALLED=$? | ||
command -v docker-compose | export DOCKER_COMPOSE_INSTALLED=$? | ||
|
||
|
||
if [[ $DOCKER_INSTALLED -ne 0 ]]; then | ||
echo "Error: Docker is not installed on this machine." | ||
exit 1 | ||
fi | ||
|
||
if [[ $DOCKER_COMPOSE_INSTALLED -ne 0 ]]; then | ||
echo "Error: Docker Compose is not installed on this machine." | ||
exit 1 | ||
fi | ||
|
||
docker compose up -d | ||
|
||
export START_STATUS=$(echo $?) | ||
if [[ $START_STATUS -ne 0 ]]; then | ||
echo "Error: DRGON did not start successfully." | ||
exit 1 | ||
fi | ||
|
||
echo "Done! You can stop your DRGON instance at any time with 'docker compose down'." | ||
exit 0 | ||
|