build: fix default values in startup script for docker
This commit is contained in:
1 parent
5fb29ea4ed
commit
4378321c65
2 files changed
+3
-6
No files matched your search
@@ -27,6 +27,7 @@ services:
|
||||
- ./logs:/app/logs
|
||||
environment:
|
||||
MYSQL_HOST: 'db'
|
||||
MYSQL_PORT: '3306'
|
||||
MYSQL_USER: 'java'
|
||||
MYSQL_PASSWORD: 'password'
|
||||
MYSQL_DATABASE: 'netneutrality'
|
||||
|
||||
+2
-6
@@ -1,9 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
prop() {
|
||||
grep "${1}" bot.properties | cut -d'=' -f2
|
||||
}
|
||||
|
||||
_term() {
|
||||
echo "Caught SIGTERM/SIGINT signal, graceful shutdown of bot.."
|
||||
if [ -z "$pid" ]; then
|
||||
@@ -29,11 +25,11 @@ if [ -z $API_PORT ]; then
|
||||
fi
|
||||
|
||||
if [ -z $MYSQL_HOST ]; then
|
||||
MYSQL_HOST="$(prop 'MYSQL_HOST')"
|
||||
MYSQL_HOST="localhost"
|
||||
fi
|
||||
|
||||
if [ -z $MYSQL_PORT ]; then
|
||||
MYSQL_PORT=$(prop 'MYSQL_PORT')
|
||||
MYSQL_PORT=3306
|
||||
fi
|
||||
|
||||
echo "Waiting 10 seconds for database to start.."
|
||||
|
||||
Reference in new issue
Block a user