From 86cc55053789fea37d30e4adbd4e501f9f901af7 Mon Sep 17 00:00:00 2001 From: Robert Martin-Legene <robert@martin-legene.dk> Date: Fri, 17 Jul 2020 01:44:15 -0300 Subject: [PATCH] Tweaks --- collector/Dockerfile | 4 ++-- collector/sql.pm | 2 +- docker-compose.yml | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/collector/Dockerfile b/collector/Dockerfile index 0b783d9..2581bb0 100644 --- a/collector/Dockerfile +++ b/collector/Dockerfile @@ -8,5 +8,5 @@ RUN chown -R bfa /home/bfa USER bfa WORKDIR /home/bfa ENV BFANODE http://public.47525974938.bfa.martin-legene.dk:8545/ -#CMD /home/bfa/collector/collector.sh -CMD sleep 14d +CMD /home/bfa/collector/collector.pl +#CMD sleep 14d diff --git a/collector/sql.pm b/collector/sql.pm index 516257f..be768e3 100644 --- a/collector/sql.pm +++ b/collector/sql.pm @@ -15,7 +15,7 @@ sub new my ( $class ) = @_; my $self = bless {}, ref $class || $class; $self->dbh( DBI->connect( - 'dbi:Pg:dbname=postgres;host=postgres','postgres','onlythelonely', + 'dbi:Pg:dbname=postgres;host=postgres','postgres',$ENV{'POSTGRES_PASSWORD'}, {AutoCommit=>0,RaiseError=>1} )); return $self; diff --git a/docker-compose.yml b/docker-compose.yml index 44a981a..ec74c3e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,9 @@ services: environment: POSTGRES_PASSWORD: onlythelonely volumes: - - blockdb_postgres:/var/lib/postgresql + - pgdata:/var/lib/postgresql/data + ports: + - 5432:5432 collector: build: collector @@ -30,4 +32,4 @@ services: # - 8080:8080 volumes: - blockdb_postgres: + pgdata: -- GitLab