Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/webooks with tasks support #165

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ run-dev:
GIT_REVISION=$(shell git rev-parse --short HEAD) \
pipenv run ./manage.py runserver 8889

run-dev-standalone:
docker-compose -f docker-compose.dev.yml up -d && \
GIT_TAG=$(shell git describe --tags) \
GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) \
GIT_REVISION=$(shell git rev-parse --short HEAD) \
pipenv run ./manage.py runserver 8889


build-docker-image:
docker build \
-t c2dhunilu/journal-of-digital-history-backend:${BUILD_TAG} \
Expand Down
13 changes: 9 additions & 4 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ verify_ssl = true
psycopg2-binary = "==2.8.6"
djangorestframework = "==3.12.2"
django-crispy-forms = "==1.10.0"
asgiref = "==3.3.1"
asgiref = "==3.3.2"
pytz = "==2020.4"
sqlparse = "==0.4.1"
drf-recaptcha = "==2.0.4"
Django = "==3.1.3"
drf-recaptcha = "==2.2.1"
Django = "==3.2.14"
django-ipware = "==3.0.2"
shortuuid = "==1.0.1"
jsonschema = "==3.2.0"
Expand Down Expand Up @@ -44,7 +44,12 @@ jupyter-core = "==4.7.1"
traitlets = "==5.0.5"
urllib3 = "==1.26.6"
ipython_genutils = "==0.2.0"
citeproc-py = "*"
citeproc-py = "==0.6.0"
lxml = "==4.6.3"
pillow = "==8.1.2"
pycountry = "==22.3.5"
qrcode = "==7.3"
django-import-export = "==2.8.0"

[requires]
python_version = "3.8"
208 changes: 198 additions & 10 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ pipenv install -r requirements.txt
make run-dev
```

There is a docker-compose.dev.yml file you can use to starts a postgres database and the redis server, with port exposed.
Credentials are given in the .env file.

In this case use:

```
make run-dev-standalone
```


### SEO configuration in development
THe django app `jdhseo` needs a JDHSEO_PROXY_HOST env variable in the full form
**without the trailing slash** like `https://local-proxy-domain-name`.
Expand All @@ -20,7 +30,6 @@ The domain name provided should correctly handle the `/proxy-githubusercontent`
path.
By default this value is set to `https://journalofdigitalhistory.org`


### Celery tasks in development
The django app `jdhtasks` is a separate app that should contain all celery tasks.
However, as we use `autodiscover_tasks`, tasks can be added in each app.
Expand Down
16 changes: 16 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: '3.7'
services:
redis:
image: redis:alpine
restart: always
entrypoint: redis-server --appendonly yes
ports:
- "${REDIS_PORT:-6379}:6379"
postgresdb:
image: postgres:12-alpine
ports:
- "${DATABASE_PORT:-54320}:5432"
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_DB: ${DATABASE_NAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
Loading