Skip to content

Commit

Permalink
LB-591: Upgrade postgresql-client to 12 from 9.5 (#861)
Browse files Browse the repository at this point in the history
* Update files

* Change psql user to listenbrainz

* Update variable name
  • Loading branch information
shivam-kapila committed May 17, 2020
1 parent 994308a commit 5a57d16
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -20,7 +20,7 @@ RUN apt-get update \

# PostgreSQL client
RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
ENV PG_MAJOR 9.5
ENV PG_MAJOR 12
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
RUN apt-get update \
&& apt-get install -y --no-install-recommends postgresql-client-$PG_MAJOR \
Expand Down
5 changes: 3 additions & 2 deletions develop.sh
@@ -1,5 +1,7 @@
#!/bin/bash

POSTGRES_LB_URI="postgresql://listenbrainz:listenbrainz@db/listenbrainz"

if [[ ! -d "docker" ]]; then
echo "This script must be run from the top level directory of the listenbrainz-server source."
exit -1
Expand All @@ -19,8 +21,7 @@ function invoke_manage {

function open_psql_shell {
invoke_docker_compose run --rm web psql \
-U listenbrainz \
-h db listenbrainz
$POSTGRES_LB_URI
}

function npm_install {
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.test
Expand Up @@ -14,7 +14,7 @@ RUN apt-get update \

# PostgreSQL client
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
ENV PG_MAJOR 9.5
ENV PG_MAJOR 12
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
RUN apt-get update \
&& apt-get install -y --no-install-recommends postgresql-client-$PG_MAJOR \
Expand Down

0 comments on commit 5a57d16

Please sign in to comment.