Skip to content

Commit 5538a14

Browse files
committed
Dev setup: Use Docker for PostgreSQL
1 parent 8a93762 commit 5538a14

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ Für die Authentisierung wird ein Session Cookie oder Basic Auth akzeptiert.
2121
Voraussetzungen:
2222

2323
- Python 3
24-
- Pip
25-
- PostgreSQL
24+
- Docker
2625

27-
Datenbank:
26+
Container mit PostgreSQL starten:
2827

29-
createdb interna
28+
docker run -d --name interna-pg \
29+
-e POSTGRES_DB=interna \
30+
-e POSTGRES_USER=interna \
31+
-e POSTGRES_PASSWORD=interna-dev-password \
32+
-p 127.0.0.1:5432:5432 docker.io/postgres:14-alpine
3033

3134
[Virtualenv](https://docs.python.org/3/library/venv.html) erstellen:
3235

@@ -45,7 +48,7 @@ Umgebungsvariablen definieren (`.env` Datei wird automatisch geladen):
4548

4649
echo "DJANGO_DEBUG=True" >> .env
4750
echo "SITE_DOMAIN='http://localhost:8000'" >> .env
48-
echo "DATABASE_URL='postgres://localhost/interna'" >> .env
51+
echo "DATABASE_URL='postgres://interna:interna-dev-password@localhost/interna'" >> .env
4952

5053
Datenbank migrieren:
5154

0 commit comments

Comments
 (0)