Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/sitn/geoshop2
Browse files Browse the repository at this point in the history
  • Loading branch information
maltaesousa committed Apr 7, 2020
2 parents 2b48648 + 7ad3cfc commit b9f741e
Show file tree
Hide file tree
Showing 99 changed files with 16,961 additions and 184 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
.vscode
.vscode
back/.idea/
front/.idea/
front/node_modules/
54 changes: 53 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@

### Installing GDAL on Windows
Download the GDAL 2.4 wheel (3.X isn't supported yet by Django) on this page: https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal. For example, if you have Python 3.6 64bit, choose `GDAL‑2.4.1‑cp36‑cp36m‑win_amd64.whl`.
Then install it:
Then install it wether system wide or in your venv:

```
pipenv shell
pip install path\to\your\GDAL-2.4XXXX.whl
```

Expand Down Expand Up @@ -76,3 +77,54 @@ Translations can be generated with:
```powershell
python manage.py compilemessages
```

### Frontend

Install the current LTS version of [Nodejs](https://nodejs.org/en/).

Install @angular/cli and typescript globally

```powershell
npm install -g @angular/cli typescript
```

Install the dependances of the frontend

```powershell
cd front
npm install
```

To start the debug of the frontend

```powershell
npm start
```

Then open a browser and go to [Geoshop2](http://localhost:4200)


## Deploy

collect static files:

```powershell
python .\manage.py collectstatic
```

configure apache

```apache
Alias /back_enpoint/static "/path/to/folder/back/static/"
<Directory "/path/to/folder/back/static/">
Require all granted
</Directory>
WSGIScriptAlias /back_enpoint /path/to/file/back/apache/app.wsgi
<Directory /path/to/file/back/apache>
<Files app.wsgi>
Require all granted
</Files>
</Directory>
```
6 changes: 6 additions & 0 deletions back/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ PGPORT=5432
PGPASSWORD=geoshop
PGSCHEMA=geoshop
PGPOSTGRESPASSWORD=postgres
ALLOWED_HOST=localhost
GDAL_IN_VENV=True
GDAL_DATA=path\to\.venv\Lib\site-packages\osgeo\data\gdal
ROOTURL=/geoshop2_dev
DEFAULT_FROM_EMAIL=[email protected]
EMAIL_HOST=smtp.example.com
2 changes: 2 additions & 0 deletions back/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,5 @@ local_settings.py
.env
db.sqlite3
.venv
static/*
!static/.gitkeep
Loading

0 comments on commit b9f741e

Please sign in to comment.