Changed database user to postgres

This commit is contained in:
Per Qvarforth 2025-01-12 17:35:47 +01:00
parent 7576beb072
commit eee9339ee8
7 changed files with 14 additions and 13 deletions

View File

@ -1 +1 @@
db:5432:trackdirect:root:foobar
db:5432:trackdirect:postgres:foobar

View File

@ -1,9 +1,9 @@
# Note that server id and passcode needs to be changed
ServerId MY-SERVER-ID
PassCode 11111
ServerId APRSDIR-3
PassCode 30376
MyAdmin "My Name, MySignal"
MyEmail me@domain.com
MyAdmin "Per Qvarforth, SM4WJF"
MyEmail per@qvarforth.se
disallow_unverified false
RunDir data
@ -27,4 +27,4 @@ HTTPStatusOptions ShowEmail=1
# After configuring the rest of the settings, remove this bad command
# from the configuration file. It's here only to avoid starting the
# server up accidentally with an invalid configuration.
MagicBadness 42.7
#MagicBadness 42.7

View File

@ -34,7 +34,7 @@ coverage_percentile="95"
;; If using docker, set host to "db", otherwise "127.0.0.1"
host="db"
database="trackdirect"
username="root"
username="postgres"
password="foobar"
port="5432"

View File

@ -1,2 +1,2 @@
40 * * * * ~/trackdirect/server/scripts/remover.sh trackdirect.ini
*/30 * * * * ~/trackdirect/server/scripts/ogn_devices_install.sh trackdirect db 5432
*/30 * * * * ~/trackdirect/server/scripts/ogn_devices_install.sh trackdirect db 5432 postgres

View File

@ -61,11 +61,11 @@ services:
context: .
dockerfile: trackdirect-db.dockerfile
environment:
POSTGRES_USER: root
POSTGRES_USER: postgres
POSTGRES_PASSWORD: foobar
POSTGRES_DB: trackdirect
volumes:
- $PWD/db:/var/lib/postgresql/data
command: -c config_file=/etc/postgresql.conf
ports:
- "5432:5432"
- "5432:5432"

View File

@ -18,7 +18,7 @@ else
sleep 30
export PYTHONPATH=$PYTHONPATH:$CURRENTDIR/../trackdirect
cd $CURRENTDIR/../..
$CURRENTDIR/ogn_devices_install.sh trackdirect db 5432
$CURRENTDIR/ogn_devices_install.sh trackdirect db 5432 postgres
python $CURRENTDIR/../bin/collector.py $CONFIGFILE $COLLECTORNUMBER
exit 0
fi

View File

@ -2,13 +2,14 @@
if [ $# -eq 0 ]
then
echo "No arguments supplied"
echo "$0 [dbname] [dbport]"
echo "$0 [dbname] [dbport] [dbuser]"
exit
fi
DATABASE=$1
HOST=$2
PORT=$3
USER=$4
pushd `dirname $0` > /dev/null
SCRIPTPATH=`pwd -P`
@ -34,7 +35,7 @@ else
sed '/^#/ d' < ogndevices.csv > ogndevices2.csv
# Load file into database (assumes .pgpass is correctly set)
psql -h $HOST -p $PORT $DATABASE << EOF
psql -h $HOST -p $PORT $DATABASE -U $USER << EOF
create table if not exists ogn_device (
"device_type" text not null,