Compare commits

..

No commits in common. "main" and "python38_dockerfile" have entirely different histories.

12 changed files with 640 additions and 9105 deletions

View File

@ -39,7 +39,6 @@ RUN /bin/bash create_sys_dir.sh
# Install dependencies: # Install dependencies:
RUN pip install --upgrade pip setuptools wheel
RUN pip install -r requirements.txt RUN pip install -r requirements.txt
RUN cp static/app/constants.js.sample static/app/constants.js RUN cp static/app/constants.js.sample static/app/constants.js

View File

@ -51,6 +51,25 @@ $ docker-compose run taxhub bash install_db.sh
$ docker-compose up -d taxhub $ docker-compose up -d taxhub
``` ```
#### Compilation du JS de Taxhub
This is probably not needed as we don't use Taxhub.
##### Mise à jour de npm
```
$ docker-compose exec -u root taxhub bash
taxhub $ npm install npm@latest -g
```
#### Compilation du code
```
$ docker-compose exec taxhub bash
taxhub $ cd static
taxhub $ cp app/constants.js.sample app/constants.js
taxhub $ npm install
```
### nginx ### nginx
Redirige de 8080 vers autres services : Redirige de 8080 vers autres services :
@ -91,7 +110,7 @@ In order to interactively edit the js code, the frontend folder is mounted into
```bash ```bash
docker-compose exec citizen-front bash docker-compose exec citizen-front bash
root@9c0fea7720a0:/home/appuser/citizen/frontend# npm run ng serve -- --host 0.0.0.0 --port 4200 --configuration=fr --poll 2000 --sourceMap=false root@9c0fea7720a0:/home/appuser/citizen/frontend# npm run ng serve -- --host 0.0.0.0 --port 4200 --configuration=fr --poll 2000
``` ```
The app must be looked at **http://localhost:4200/**. The app must be looked at **http://localhost:4200/**.
@ -108,14 +127,7 @@ or `npm run build:fr` for speeding up.
### Back-end development ### Back-end development
When developing the app and serving it with `docker-compose up`, the changes should be automatically loaded (meaning, the app is watching the changes) (Note that this is not the case anymore). However, it is more practical to change the command of the backend container from `command: bash start_gunicorn.sh` to `command: python wsgi.py` in order to have some logs. When developing the app and serving it with `docker-compose up`, the changes are automatically loaded (meaning, the app is watching the changes). However, it is more practical to change the command of the backend container from `command: bash start_gunicorn.sh` to `command: python wsgi.py` in order to have some logs.
You can access a flask shell terminal with the following:
```bash
docker-compose exec citizen-back bash
appuser@5d4fc6b169b2:~/citizen/backend$ flask shell
```
## Deploiement sur un serveur distant ## Deploiement sur un serveur distant

View File

@ -4,7 +4,7 @@ services:
db: db:
image: postgis/postgis:12-3.1-alpine image: postgis/postgis:12-3.1-alpine
ports: ports:
- "5434:5432" - "5432:5432"
volumes: volumes:
- "pg-data:/var/lib/postgresql/data" - "pg-data:/var/lib/postgresql/data"
environment: environment:

View File

@ -17,7 +17,7 @@ DEBUG = false
SQLALCHEMY_DEBUG_LEVEL = 'WARNING' SQLALCHEMY_DEBUG_LEVEL = 'WARNING'
# URL_APPLICATION = "http://mydomain.org" # Replace mydomain.org by your domain # URL_APPLICATION = "http://mydomain.org" # Replace mydomain.org by your domain
URL_APPLICATION = "https://localhost:8080/" URL_APPLICATION = "http://taxhub:5000"
API_TAXHUB = "http://taxhub:5000/api/" API_TAXHUB = "http://taxhub:5000/api/"
# API_TAXHUB = "http://mytaxhub.org/api/" # Replace mytaxhub.org by your TaxHub url # API_TAXHUB = "http://mytaxhub.org/api/" # Replace mytaxhub.org by your TaxHub url
@ -48,7 +48,7 @@ REWARDS_ENABLED = false
USE_CONFIRM_EMAIL = true USE_CONFIRM_EMAIL = true
SUBJECT = "Activez votre compte" SUBJECT = "Activez votre compte"
FROM = '"Biommap" <contact@geonature-citizen.fr>' FROM = '"Biommap" <contact@geonature-citizen.fr>'
HTML_TEMPLATE = '''<p> Bonjour,</p><br /><p>Nous vous confirmons que votre compte Biommap a bien été créé.</p> HTML_TEMPLATE = '''<p> Bonjour,</p><br /><p>Nous vous confirmons que votre compte a bien été créé.</p>
<p> Afin d'activer votre compte veuillez <a href="{activate_url}">cliquer ici.</a> <p> Afin d'activer votre compte veuillez <a href="{activate_url}">cliquer ici.</a>
<p>Nous vous souhaitons la bienvenue sur notre site.</p><br /> <p>Nous vous souhaitons la bienvenue sur notre site.</p><br />
<p>Bien à vous.</p> <p>Bien à vous.</p>
@ -61,15 +61,10 @@ REWARDS_ENABLED = false
[MAIL] [MAIL]
MAIL_USE_SSL = false MAIL_USE_SSL = false
MAIL_STARTTLS = true MAIL_STARTTLS = true
MAIL_HOST = 'mail.easter-eggs.com' MAIL_HOST = 'smtpd host'
MAIL_PORT = 587 # mandatory SSL port MAIL_PORT = 493 # mandatory SSL port
MAIL_AUTH_LOGIN = 'julien.minet@champs-libres.coop' MAIL_AUTH_LOGIN = 'smtpd/relay host username'
MAIL_AUTH_PASSWD = 'Bomel2164' MAIL_AUTH_PASSWD = 'smtpd/relay host password'
ADMIN_MESSAGE = '''<p>Bonjour administrateur,</p><br />
<p>Un nouvel utilisateur de Biommap avec le nom d'utilisateur "{newuser_username}" a été créé!</p>
<p>Vous pouvez gérer cet utilisateur dans l'espace d'administration.</p><br />
<p>Bonne journée</p>
'''
# API flasgger main config # API flasgger main config

View File

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="800px"
height="800px"
viewBox="0 0 24 24"
fill="none"
version="1.1"
id="svg4"
sodipodi:docname="check-circle-svgrepo-com-green.svg"
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2506"
inkscape:window-height="1403"
id="namedview6"
showgrid="false"
inkscape:zoom="0.834386"
inkscape:cx="448.21459"
inkscape:cy="381.26471"
inkscape:window-x="54"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM16.0303 8.96967C16.3232 9.26256 16.3232 9.73744 16.0303 10.0303L11.0303 15.0303C10.7374 15.3232 10.2626 15.3232 9.96967 15.0303L7.96967 13.0303C7.67678 12.7374 7.67678 12.2626 7.96967 11.9697C8.26256 11.6768 8.73744 11.6768 9.03033 11.9697L10.5 13.4393L12.7348 11.2045L14.9697 8.96967C15.2626 8.67678 15.7374 8.67678 16.0303 8.96967Z"
fill="#1C274C"
id="path2"
style="fill:#60b15c" />
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -20,7 +20,7 @@ export const MAP_CONFIG = {
{ {
name: "Hydrographie", name: "Hydrographie",
maxZoom: 20, maxZoom: 20,
layer: "//geoservices.wallonie.be/arcgis/services/EAU/RHW_SIMPLE/MapServer/WMSServer?", layer: "//geoservices.wallonie.be/arcgis/services/EAU/RHW/MapServer/WMSServer?",
layers: ['1', '2', '3', '4', '5','6'], layers: ['1', '2', '3', '4', '5','6'],
wms: true, wms: true,
attribution: '&copy; SPW' attribution: '&copy; SPW'
@ -44,7 +44,7 @@ export const MAP_CONFIG = {
{ {
name: "Pentes (relief)", name: "Pentes (relief)",
maxZoom: 20, maxZoom: 20,
layer: "//geoservices.wallonie.be/arcgis/services/RELIEF/WALLONIE_MNP_2013_2014__CLASSES/MapServer/WMSServer?", layer: "//geoservices.wallonie.be/arcgis/services/RELIEF/WALLONIE_MNP_CLASSE_2013_2014/MapServer/WMSServer?",
layers: '0', layers: '0',
wms: true, wms: true,
attribution: '&copy; SPW' attribution: '&copy; SPW'
@ -83,9 +83,9 @@ export const MAP_CONFIG = {
attribution: '&copy; SPW' attribution: '&copy; SPW'
}, },
{ {
name: "Parcellaire agricole anonyme 2020", name: "Parcellaire agricole anonyme 2019",
maxZoom: 20, maxZoom: 20,
layer: "//geoservices.wallonie.be/arcgis/services/AGRICULTURE/SIGEC_PARC_AGRI_ANON__2020/MapServer/WMSServer?", layer: "//geoservices.wallonie.be/arcgis/services/AGRICULTURE/SIGEC_PARC_AGRI_ANON__2019/MapServer/WMSServer?",
layers: '0', layers: '0',
wms: true, wms: true,
attribution: '&copy; SPW' attribution: '&copy; SPW'
@ -177,8 +177,8 @@ export const MAP_CONFIG = {
{ {
name: "Limites administratives", name: "Limites administratives",
maxZoom: 20, maxZoom: 20,
layer: "//ccff02.minfin.fgov.be/geoservices/arcgis/services/WMS/Cadastral_Layers/MapServer/WMSServer?", layer: "//ccff02.minfin.fgov.be/geoservices/arcgis/services/INSPIRE/AU_wms/MapServer/WMSServer?",
layers: ['Region', 'Province', 'Municipality'], layers: ['1', '2', '3', '4'],
wms: true, wms: true,
attribution: '&copy; CadGIS' attribution: '&copy; CadGIS'
}, },

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

@ -1 +1 @@
Subproject commit f5db4bfae7174e1c68f4b3e56c95e38482f2557e Subproject commit 6f51f92cf640afbef6750fd4466cc2c385f94507