Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

894 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mapswipe Backend

codecov

Local development

Setup

Clone repository

git clone git@github.com:mapswipe/mapswipe-backend.git mapswipe-backend
cd mapswipe-backend

Create a .env file

Important

NOTE: Overwrite/set variables using .env

Available options are defined in ./docker-compose.yaml:10 (environment) and ./main/settings.py:16 (env = environ.Env)

Pull and build images

docker compose pull
docker compose build

Run

Run Essentials

docker compose up

Run Web & Workers

docker compose up web worker worker-beat

Django migration commands

# Create new migrations if required
docker compose exec web ./manage.py makemigrations

# Show migrations status
docker compose exec web ./manage.py showmigrations

# Run latest migrations
docker compose exec web ./manage.py migrate

User management commands

# Create new user
docker compose exec web ./manage.py createsuperuser

# Change existing user's password
docker compose exec web ./manage.py changepassword mapswipe-user-1

https://docs.djangoproject.com/en/latest/ref/django-admin/#createsuperuser

https://docs.djangoproject.com/en/5.1/ref/django-admin/#changepassword

Generate latest GraphQl schema

docker compose run --rm web ./manage.py graphql_schema --out schema.graphql
# OR
docker compose exec web ./manage.py graphql_schema --out schema.graphql

Run tests

docker compose run --rm test pytest
# OR
docker compose exec test pytest

Changelog

We use git-cliff to manage changelogs. The configuration is in ./cliff.toml.

Install

Follow the instructions here: https://git-cliff.org/docs/installation/

Prepare a release

./release.sh v0.1.2
git push
git push origin tag v0.1.2

Tips

You can use django run command if there are no running instance for temporary commands

# If you want to generate latest GraphQl schema
# You can replace this command
docker compose exec web ./manage.py graphql_schema --out schema.graphql
# with this (Which will create a temporary container, run the command, and clean of the container)
docker compose run --rm web ./manage.py graphql_schema --out schema.graphql

Upgrading Python Version

Update the Python version in the following files:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages