Skip to content

Commit

Permalink
Revert "Django 4.2 update work (#260)" (#268)
Browse files Browse the repository at this point in the history
This reverts commit 2456544.
  • Loading branch information
mattmachell authored May 2, 2024
1 parent 2f98e9a commit 497943d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 16 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
.envrc
.DS_Store
postgres_data
opgincidentresponse/static

__pycache__
/static/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ OPG Incident Response is a Django app based on [Monzo's Response tool](https://g

To start the application locally, copy `env.dev.example` to `.env` and configure the environment variables inside. All environment variables need to be set, but some can be set to nonsense values (i.e. `ENV_VAR=...`) as detailed in the table below.

You will need to configure a Slack app following the instructions below, and can then start the application with `docker-compose up -d`. The app will be served by nginx on ```http://localhost:80/```
You will need to configure a Slack app following the instructions below, and can then start the application with `docker-compose up -d`.

Note if you are using ngrok, they have now introduced auth tokens. You can add an NGROK_AUTHTOKEN to your local .env file and it will be passed down to the container so you don't risk commiting it.

Expand Down
11 changes: 3 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,12 @@ services:
tty: true

db:
image: "postgres:13"
image: "postgres:11.2"
container_name: postgres
ports:
- "5432:5432"
volumes:
- postgres_data_13_vol:/var/lib/postgresql/data/
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_USER: postgres
PGPASSWORD: postgres
- postgres_data:/var/lib/postgresql/data/

ngrok:
image: ngrok/ngrok:latest
Expand All @@ -73,5 +68,5 @@ services:
- response

volumes:
postgres_data_13_vol:
postgres_data:
pypd:
1 change: 0 additions & 1 deletion opgincidentresponse/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"PORT": os.getenv("DB_PORT", "5432"),
"USER": os.getenv("DB_USER", "postgres"),
"NAME": os.getenv("DB_NAME", "postgres"),
"PASSWORD": os.environ.get("DB_PASSWORD", "postgres"),
}
}

Expand Down
6 changes: 3 additions & 3 deletions opgincidentresponse/urls.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.urls import include, path
from django.urls import re_path
from django.conf.urls import url

from decorator_include import decorator_include

Expand All @@ -10,9 +10,9 @@
urlpatterns = [
path("", views.home, name="home"),
path("incident/<int:incident_id>/", views.incident, name="incident_doc"),
re_path("", include('social_django.urls', namespace='social')),
url("", include('social_django.urls', namespace='social')),
path("admin/", admin.site.urls),
re_path(r'^ht/', include('health_check.urls')),
url(r'^ht/', include('health_check.urls')),
path("slack/", include("response.slack.urls")),
path("core/", decorator_include(login_required, "response.core.urls")),
]
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Django==4.2
Django==3.2.25
django-after-response==0.2.2
git+https://github.com/ministryofjustice/opg-response.git@41a534aa7751b8b0d3d50a8839fa74fb71405975#egg=django-incident-response
git+https://github.com/ministryofjustice/opg-response.git@10bcb5dcdaf380d9ca20687526a8e798395ab2fc#egg=django-incident-response
django-health-check==3.18.1
django-decorator-include
pytest-mock
Expand Down

0 comments on commit 497943d

Please sign in to comment.