Skip to content

Commit 9e5da26

Browse files
committed
Upgrade the version of postgres used in local development
New versions of the postgres docker image require a password, so add one
1 parent 41a5b76 commit 9e5da26

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ Below are instructions for setting up a local Freesound installation for develop
7474
# or if the above command does not work, try this one
7575
docker compose run --rm --no-TTY db psql -h db -U freesound -d freesound < freesound-data/db_dev_dump/freesound-small-dev-dump-2023-09.sql
7676

77+
If you a prompted for a password, use `localfreesoundpgpassword`, this is defined in the `docker-compose.yml` file.
78+
7779
10. Update database by running Django migrations
7880

7981
docker compose run --rm web python manage.py migrate

docker-compose.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@ services:
88

99
# Database server
1010
db:
11-
image: postgres:12.1
11+
image: postgres:16.6
1212
volumes:
1313
- pgdata:/var/lib/postgresql/data
1414
- ./freesound-data/db_dev_dump:/freesound-data/db_dev_dump
15-
env_file:
16-
- environment
1715
ports:
1816
- "${FS_BIND_HOST:-127.0.0.1}:${LOCAL_PORT_PREFIX}5432:5432"
1917
environment:
2018
- POSTGRES_USER=freesound
2119
- POSTGRES_DB=freesound
20+
- POSTGRES_PASSWORD=localfreesoundpgpassword
2221
- FS_USER_ID
2322

2423
# Web worker

environment

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
DJANGO_DATABASE_URL=postgres://freesound@db/freesound
1+
DJANGO_DATABASE_URL=postgres://freesound:localfreesoundpgpassword@db/freesound

0 commit comments

Comments
 (0)