Backend for https://eahub.org
-
Make sure to have Docker Compose installed. (Note: You may need to follow these post-installation steps.)
-
Add the following line to your hosts file (
/etc/hosts
on Mac or Linux,%SystemRoot%\System32\drivers\etc\hosts
on Windows):127.0.0.1 objstore
-
docker-compose run web django-admin createcontainer
-
docker-compose run web django-admin migrate
$ docker-compose up
If everything went well, you should have a number of containers now being served (use docker ps
to get a list of them).
You should be able to get the Hub at http://localhost:8000.
If the Dockerfile has changed since last time you did this, you'll need to run
docker-compose up --build
or docker-compose build
.
If the database schema has changed since last time, you'll need to run
docker-compose run web django-admin migrate
.
To see live changes to the frontend while developing, you need to stop the docker
container and run docker-compose up --build
again.
$ docker-compose run --use-aliases web pytest
If you're running these for the first time or package.json
has changed, run
npm install
Then run
npm test
$ docker-compose run web black .
You must run this before sending a pull request or else it will be automatically blocked from merging.
You can also automatically sort your imports:
$ docker-compose run web isort -rc --atomic .
After uploading a new docker image, the website will automatically update
$ cd eahub
$ docker build -t eahub:latest .
$ docker system prune --force
$ docker tag eahub eahub.azurecr.io/eahub:latest
$ docker push eahub.azurecr.io/eahub:latest
$ docker-compose run web bash
$ docker-compose run web django-admin shell
$ docker-compose run web django-admin makemigrations
$ docker-compose run web django-admin migrate
- Images are privately saved to our Azure Container Registry
$ docker login eahub.azurecr.io
>>> username: eahub
>>> password: <see lastpass>
We support the most recent version of Google Chrome, Mozilla Firefox, Safari, and Microsoft Edge.
We support browsers with JavaScript disabled, but they will receive a degraded experience without dynamic client-side functionality. Because our JavaScript works only in modern browsers, legacy browsers like Internet Explorer receive the same degraded experience.
These are primarily for the benefit of maintainers, but all contributors are urged to follow them in order to make maintainers' lives easier.
- In general, follow the practices outlined in "How to Write a Git Commit Message" by Chris Beams.
- As an exception to the above, do not manually wrap the body of a commit
message. The main reason for this is because our workflow depends on the
GitHub web interface, which doesn't provide an easy way to do this. It does
not depend on emailing patches, so the benefits of wrapped lines don't apply.
There is arguably some benefit to the usability of
git log
, but it doesn't outweigh the costs. - Maintainers should use GitHub's squash merging exclusively. Merge commits and rebase merging have been disabled in GitHub.