Skip to content

Commit a7302a3

Browse files
committed
Improve database settings
- Prevents conflicts with other systems - Less unused code, yay
1 parent 269aea1 commit a7302a3

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

.github/workflows/python-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ jobs:
2424
image: postgres:15.5-alpine
2525
env:
2626
POSTGRES_HOST_AUTH_METHOD: trust
27-
ports: ['5432:5432']
27+
ports: ["6543:5432"]
2828
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
2929

3030
task-processor-database:
3131
image: postgres:15.5-alpine
3232
env:
3333
POSTGRES_HOST_AUTH_METHOD: trust
34-
ports: ['5433:5432']
34+
ports: ["6544:5432"]
3535
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
3636

3737
steps:

docker/docker-compose.local.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616
volumes:
1717
- default-database:/var/lib/postgresql/data
1818
ports:
19-
- 5432:5432
19+
- 6543:5432
2020
environment:
2121
POSTGRES_HOST_AUTH_METHOD: trust
2222
TZ: UTC
@@ -31,7 +31,7 @@ services:
3131
volumes:
3232
- task-processor-database:/var/lib/postgresql/data
3333
ports:
34-
- 5433:5432
34+
- 6544:5432
3535
environment:
3636
POSTGRES_HOST_AUTH_METHOD: trust
3737
TZ: UTC

settings/dev.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,13 @@
2525
# Settings required for tests
2626
SECRET_KEY = "test"
2727
DATABASES = {
28-
"default": dj_database_url.parse(
29-
env(
30-
"DATABASE_URL",
31-
default="postgresql://postgres@localhost:5432/postgres",
32-
),
28+
"default": (
29+
default_database_url := dj_database_url.parse(
30+
"postgresql://postgres@localhost:6543/postgres",
31+
)
3332
),
3433
"task_processor": dj_database_url.parse(
35-
env(
36-
"TASK_PROCESSOR_DATABASE_URL",
37-
default="postgresql://postgres@localhost:5433/postgres",
38-
),
34+
"postgresql://postgres@localhost:6544/postgres",
3935
),
4036
}
4137
TASK_PROCESSOR_DATABASES = ["default"]

0 commit comments

Comments
 (0)