Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/city-of-helsinki/open-city-signups
Signup backend
https://github.com/city-of-helsinki/open-city-signups
Last synced: 6 days ago
JSON representation
Signup backend
- Host: GitHub
- URL: https://github.com/city-of-helsinki/open-city-signups
- Owner: City-of-Helsinki
- License: mit
- Created: 2018-05-14T08:15:49.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-20T17:36:22.000Z (almost 4 years ago)
- Last Synced: 2024-11-18T23:16:03.392Z (2 months ago)
- Language: Python
- Size: 48.8 KB
- Stars: 0
- Watchers: 28
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Open city sign-ups
## Development with Docker
1. Create `.env` environment file
2. Set the `DEBUG` environment variable to `1`
3. Run `docker-compose up`
4. Run migrations if needed:
* `docker exec signups-backend python manage.py migrate`5. Create superuser if needed:
* `docker exec -it signups-backend python manage.py createsuperuser`
6. Run the server:
* `docker exec -it signups-backend python manage.py runserver 0:8000`## Development without Docker
### Install pip-tools
* Run `pip install pip-tools`
### Creating Python requirements files
* Run `pip-compile requirements.in`
* Run `pip-compile requirements-dev.in`### Updating Python requirements files
* Run `pip-compile --upgrade requirements.in`
* Run `pip-compile --upgrade requirements-dev.in`### Installing Python requirements
* Run `pip-sync requirements.txt requirements-dev.in`
### Database
To setup a database compatible with default database settings:
Create user and database
sudo -u postgres createuser -P -R -S open_city_signups # use password `open_city_signups`
sudo -u postgres createdb -O open_city_signups open_city_signupsAllow user to create test database
sudo -u postgres psql -c "ALTER USER open_city_signups CREATEDB;"
### Daily running
* Set the `DEBUG` environment variable to `1`.
* Run `python manage.py migrate`
* Run `python manage.py runserver 0:8000`## Running tests
* Set the `DEBUG` environment variable to `1`.
* Run `pytest`.