Skip to content

Commit

Permalink
Fixed dashboard start failed (apache#6857)
Browse files Browse the repository at this point in the history
Master Issue: apache#5847

### Motivation

Installation error of dashboard database postgres 11 resulted in startup failure.

### Modifications

* Update apachepulsar/pulsar-dashboard:2.5.1 image https://hub.docker.com/layers/apachepulsar/pulsar-dashboard/2.5.1/images/sha256-61b47a7302639aba1357d09ca69a842c4a67bff38b230753d6bd638df0461c6b?context=explore
* Update Docker file for fix postgresql version 11.

### Verifying this change

Local test pass
  • Loading branch information
tuteng authored May 7, 2020
1 parent 4e6b2f0 commit c621d99
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ FROM python:3.7-stretch

LABEL maintainer="Apache Pulsar <[email protected]>"

RUN bash -c "echo deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main >> /etc/apt/sources.list.d/pgdg.list"
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -

RUN apt-get update
RUN apt-get -y install postgresql python sudo nginx supervisor
RUN apt-get -y install postgresql-11 postgresql-contrib libpq-dev python sudo nginx supervisor

# Postgres configuration
COPY conf/postgresql.conf /etc/postgresql/11/main/
Expand Down
2 changes: 1 addition & 1 deletion dashboard/init-postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ rm -rf /data/*
chown -R postgres: /data
chmod 700 /data
sudo -u postgres /usr/lib/postgresql/11/bin/initdb /data/
sudo -u postgres /etc/init.d/postgresql start
sudo -u postgres /usr/lib/postgresql/11/bin/pg_ctl -D /data/ start
sudo -u postgres psql --command "CREATE USER docker WITH PASSWORD 'docker';"
sudo -u postgres createdb -O docker pulsar_dashboard

Expand Down

0 comments on commit c621d99

Please sign in to comment.