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

Getting started #6

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,34 @@ WITH unaccent, simple;

Now that the database is ready, you can start backend either with Docker or not.

### Run dev server without docker on a Linux based machine

- Create a virtual python environment and install the requirements.txt

- run the migrations on the DB and collectstatic:

```
python manage.py migrate
python manage.py collectstatic
```
- Create admin account and Extract group with permissions
```
python manage.py fixturize
```
- Create a super user:
```
python manage.py createsuperuser
```
- Run the application:
```
python3 manage.py runserver
```
Access the application under the indicated address
### Run dev server without docker on Windows
You'll need to configure 3 paths to your GDAL installation according to `.env.sample`.
Expand All @@ -57,7 +85,7 @@ Then, we're going to:
* Run migrations
* Collect static files for the admin interface
* Generate translations for your langage
* Generate translations for your language
* Add minimal users to database
```shell
Expand Down
15 changes: 15 additions & 0 deletions db/docker_db/init-scripts/01_init_db.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- CREATE ROLE geoshop WITH LOGIN PASSWORD geoshop;
--
-- CREATE DATABASE geoshop OWNER geoshop;
-- REVOKE ALL ON DATABASE geoshop FROM PUBLIC;

CREATE EXTENSION postgis;
CREATE EXTENSION unaccent;
CREATE EXTENSION "uuid-ossp";

CREATE SCHEMA geoshop AUTHORIZATION geoshop;

CREATE TEXT SEARCH CONFIGURATION fr (COPY = simple);

ALTER TEXT SEARCH CONFIGURATION fr ALTER MAPPING FOR hword, hword_part, word
WITH unaccent, simple;