This repository has been archived by the owner on Dec 14, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
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 #38 from Tolfix/dev
CD Notifications
- Loading branch information
Showing
17 changed files
with
268 additions
and
21 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 |
---|---|---|
|
@@ -2,4 +2,5 @@ node_modules | |
.env | ||
package-lock.json | ||
build | ||
/Docker/ | ||
/Docker/ | ||
/public/css/ |
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,75 @@ | ||
#!/bin/bash | ||
|
||
COMMAND=$1 | ||
|
||
start() { | ||
pm2 start ./build/Server.js | ||
} | ||
|
||
stop() { | ||
pm2 stop ./build/Server.js | ||
} | ||
|
||
build() { | ||
npm run build | ||
} | ||
|
||
restart() { | ||
pm2 restart ./build/Server.js | ||
} | ||
|
||
logs() { | ||
pm2 logs ./build/Server.js | ||
} | ||
|
||
update() { | ||
echo "* Getting the newest release" | ||
TAG=$(curl --silent "https://api.github.com/repos/tolfix/dmcd/releases/latest" | | ||
grep '"tag_name":' | | ||
sed -E 's/.*"([^"]+)".*/\1/') | ||
|
||
curl -L -o master.tar.gz https://github.com/Tolfix/dmcd/archive/refs/tags/$TAG.tar.gz | ||
tar xf master.tar.gz -C /var/dmcd --strip-components 1 | ||
rm -r master.tar.gz | ||
echo "* Updated DMCD" | ||
} | ||
|
||
commands() { | ||
echo " | ||
Commands: | ||
start => Starts the application | ||
build => Builds the application | ||
stop => Stops the application | ||
restart => Restarts the application | ||
logs => Shows what it has been logging | ||
update => Pulls new updates from github (if any)" | ||
} | ||
|
||
if [ "$COMMAND" = "start" ]; then | ||
start | ||
fi | ||
|
||
if [ "$COMMAND" = "stop" ]; then | ||
stop | ||
fi | ||
|
||
if [ "$COMMAND" = "build" ]; then | ||
build | ||
fi | ||
|
||
if [ "$COMMAND" = "restart" ]; then | ||
restart | ||
fi | ||
|
||
if [ "$COMMAND" = "logs" ]; then | ||
logs | ||
fi | ||
|
||
if [ "$COMMAND" = "update" ]; then | ||
update | ||
fi | ||
|
||
if [ ! "$COMMAND" ]; then | ||
commands | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@import "./ThemeColors.scss"; | ||
|
||
$theme-colors: ( | ||
"primary": $theme_main_blue, | ||
"danger": $theme_main_red, | ||
"info": $theme_main_blue, | ||
"light": $theme_main_white, | ||
"warning": $theme_main_orange, | ||
"dark": $theme_main_dark, | ||
"success": $theme_main_green, | ||
); | ||
|
||
$card-bg: $theme_main_dark; | ||
$card-color: $theme_main_white; | ||
$modal-content-bg: $theme_main_dark; | ||
$toast-header-background-color: $theme_main_dark; | ||
$toast-background-color: $theme_main_dark; | ||
$toast-color:$theme_main_white; | ||
$table-color: $theme_main_white; | ||
@import "../../node_modules/bootstrap/scss/bootstrap"; |
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 @@ | ||
@import "./Bootstrap.scss"; | ||
@import "./ThemeColors.scss"; | ||
|
||
body { | ||
background-color: $theme_darker_dark; | ||
color: $theme_main_white; | ||
} |
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,12 @@ | ||
$theme_main_dark: #595353; | ||
$theme_main_green: #72BA8C; | ||
$theme_main_purple: #ee80dc; | ||
$theme_main_pink: #d9abee; | ||
$theme_main_blue: #78b2e0; | ||
$theme_main_red: #f18986; | ||
$theme_main_orange: #dac26d; | ||
$theme_main_white: #F3EEDB; | ||
$theme_darker_dark: #3F3A3A; | ||
$theme_darker_green: #679A47; | ||
$theme_darker_orange: #aa9856; | ||
$theme_darker_white: #D3CFBD; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export function env_seperator(env: string) | ||
{ | ||
let value, name; | ||
let indexOfName = 0; | ||
|
||
for(let char of env) | ||
{ | ||
if(char === "=") | ||
break; | ||
indexOfName++; | ||
} | ||
|
||
value = env.slice(indexOfName+1); | ||
name = env.slice(0, indexOfName) | ||
|
||
return { | ||
value, | ||
name | ||
} | ||
} |
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.