Start cron and rsyslog. Change init db to look for /config/do_not_init_db

This commit is contained in:
Tim Evens 2021-03-30 23:35:22 -07:00
parent c61f766cc3
commit 9942f8a4a7
2 changed files with 5 additions and 14 deletions

View File

@ -75,8 +75,6 @@ RUN touch /usr/local/build-${BUILD_NUMBER} \
#----------------------------------
# Install depends
# Depends are installed in layers so that this doesn't have to be done each time
# the image is built.
RUN apt-get update \
&& apt-get install --allow-unauthenticated -y unzip curl wget whois vim rsyslog cron rsync kafkacat \
procps python3-minimal python3-distutils python3-psycopg2 python3-dnspython postgresql-client \
@ -85,13 +83,7 @@ RUN apt-get update \
RUN cd /tmp && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python3 get-pip.py
RUN pip install ipaddr
# Install latest postgres client
#RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' \
# && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - \
# && apt-get update
# && apt-get install postgresql-13-client
RUN pip install ipaddr pykafka
# Cleanup
RUN apt-get autoremove && apt-get clean

View File

@ -69,7 +69,7 @@ config_postgres_profile() {
# Initdb Postgres
# -----------------------------------------------
initdb_postgres() {
if [[ -f /config/init_db ]]; then
if [[ ! -f /config/do_not_init_db ]]; then
echo " ===> Initializing the DB"
# Load the schema files
@ -82,7 +82,7 @@ initdb_postgres() {
psql < $file >> /var/log/db_schema_load.log 2>&1
done
rm -f /config/init_db
touch /config/do_not_init_db
fi
}
@ -239,9 +239,8 @@ initdb_postgres
# Get rid of previous rsyslogd pid
rm -f /var/run/rsyslogd.pid
#service rsyslog start
#service cron start
service cron start
service rsyslogd start
run_consumer