Commit fd0f94e98d0279c6072b57b1ee321aa1d92a9d9c

Authored by hitier
2 parents d69e07cb 6a6d19ff
Exists in rhitier-dev

Merge branch 'ApacheDeploy' into dev

CHANGELOG.md
1   -## Nicolas
2   -
3   -- [ ] rajouter MAVEN, New Horizons, Cassini, Galileo, ExoMars comme spacecraft cible
4   -- [ ] ajouter un bouton ALERT qui permet d'ouvrir une nouvelle page de formulaire :
5   - * email
6   - * target (= planète, spacecraft, comet)
7   - * submit (envoyé ensuite vers un webservice d'AMDA à construire)
8   -- [ ] prévoir un bouton EPN-TAP ou l'on mettrait l'outil en relation avec le client VESPA développé par nathanaël
9   -- [ ] séries temporelles en échelle log ou linéaire
10   - /!\ D3 ne supporte pes les échelles log pour un domaine qui contient le 0.
11   -- [ ] juno/rosetta doivent aussi bouger le long de leur orbite lorsque l'on parcourt à la souris les données de la série temporelle; pour les intervalles de temps où rosetta n'existe plus (crash à la surface de la comète) il faut qu'elle disparaisse; pour les intervalles de temps où juno est en orbite autour de jupiter il faut que juno suive jupiter
12   - -> tout ceci est configurable dans le fichier de configuration, je n'ai pas les ids !
13   -
14   -- [ ] pour l'option jupiter thermospheric models dans l'onglet layer, une fois activée il faut que sur un tracé de la pression dynamique à jupiter tu fasses apparaître trois lignes horizontales en trois couleurs différentes pour les valeurs:
15   - Model A compressed Pdyn=0.121 nPa
16   - Model B baseline Pdyn=0.060 nPa
17   - Model C expanded Pdyn=0.020 nPa
18   -
19   -
20   -## CME Catalogs
21   -
22   -1) https://www.helcats-fp7.eu/catalogues/wp4_icmecat.html
23   -et télécharger le catalogue en ASCII, JSON ou VOTAble XML
24   -les traits verticaux à repérer sur les données Terre sont délimités par ICME_START_TIME et ICME_STOP_TIME, et il faut prendre le catalogue pour WIND uniquement (qui se trouver au point L1)
25   -et prendre aussi
26   -2) https://wind.nasa.gov/fullcatalogue.php
27   -
28   -
29   -## Future ?
30   -
31   -- [ ] Rework the images of Rosetta and Juno
32   -- [ ] Optimize data aggregation (numpy vectorization?)
33   -- [ ] Bump D3JS to v5 (and its promises)
34   -- [ ] Enable p67
35   -- [ ] IE compat, if you can (mouahahahahaha good luck)
36   -- [ ] Fix the warmup on the prod server (I was kicked out, do it yourselves)
37   -- [ ] Set the log level to _error_ in production (see `web/run.py` -- DIY)
38   -
39   -
40   -## 1.9
41   -
42   -- [x] Auroral Emissions (Jupiter)
43   -- [x] Auroral Emissions Fixes
44   -- [x] Enable the Input selector
45   -
46   -
47   -## 1.8.3
48   -
49   -- [x] Fix whitespaces
50   -
51   -
52   -## 1.8.2
53   -
54   -- [x] Fix Earth temperature
55   -
56   -
57   -## 1.8
58   -
59   -- [x] Auroral Emissions (Saturn)
60   -
61   -
62   -## 1.7
63   -
64   -- [x] Only get SWRT after OMNI
65   -- [x] Fix Rosetta & Juno squatting the CDF Download
66   -- [x] Layer : Models (disabled)
67   -- [x] Layer : Campaigns (disabled)
68   -- [x] Layer : Catalogs (disabled)
69   -- [x] Layer : Inputs (disabled)
70   -- [x] Solve the ticks' month issue
71   -
72   -
73   -## 1.6
74   -
75   -- [x] Re-enable Earth
76   -- [x] Layer : CME Catalogs
77   -- [x] Add an About page
78   -- [x] Rewrite everything using ES6 instead of Livescript
79   -- [x] Force domain re-sizing of time series to be sequential
80   -- [x] Fix broken, confusing ticks on time series
81   -- [x] Make date format in time series saner (DOY)
82   -
83   -
84   -## 1.5
85   -
86   -- [x] Use the new AMDA API
87   -- [x] Add Mercury Real Time
88   -- [x] Add Venus Real Time
89   -
90   -
91   -## 1.4.1
92   -
93   -- [x] Add logs to hunt a Heisenbug
94   -
95   -
96   -## 1.4
97   -
98   -- [x] Enable Uranus
99   -- [x] Enable Neptune
100   -
101   -
102   -## 1.3.1
103   -
104   -- [x] Disable Earth again
105   -- [x] Fix the layers being shown outside the clipping area in the time series
106   -
107   -
108   -## 1.3
109   -
110   -- [x] Earth pdyn = pv² (TBD)
111   -- [x] Earth omnihour B is a Vector3, use the first scalar
112   -- [x] Layers
113   - - SW Catalogs
114   -
115   -
116   -## 1.2
117   -
118   -- [x] Restore Earth
119   -- [x] Clean NetCDF, stage 1
120   -- [x] Accordion on the parameters list
121   -- [x] Check IE compat
122   -- [x] Bind the Alert button to a website
123   -
124   -
125   -## 1.1
126   -
127   -- [x] Credit the author of the pixel art planets (`Jr Astronaut`)
128   -- [x] … and buy his stuff from https://www.redbubble.com/people/spacefruitdox
129   -- [x] Fix a small glitch with the time series cursor on zoom
130   -
131   -
132   -## 1.0.1
133   -
134   -- [x] Fix an issue with the Time Series axes
135   -- [x] CRON statements to call the cache cleanup and warmup
136   -
137   -
138   -## 1.0.0
139   -
140   -- [x] Fix a bug with data that is offset by one hour.
141   -- [x] Use `git describe` as version number
142   -
143   -
144   -## 1.0.0-rc8
145   -
146   -- [x] Make the parameters' toogle buttons smaller
147   -- [x] Set time format to 24h in the time series
148   -- [x] Add the disabled versions of Uranus and Neptune
149   -- [x] Add the `CME Catalogs` layer
150   -
151   -
152   -## 1.0.0-rc7
153   -
154   -- [x] Add disabled layer buttons
155   -- [x] Give the future data another color
156   -- [x] Change the default interval (from 2 months in the past to one in the future)
157   -- [x] Prepare horizontal lines in the time series
158   -- [x] Add buttons to the orbits plot zoom to inner or outer heliosphere
159   -- [x] Make the Y-Axis of time series dynamic (at the expense of animations)
160   -
161   -
162   -## 1.0.0-rc6
163   -
164   -- [x] Re-lock Earth until we have better support
165   -- [x] Add support for inputs STEREO-A, STEREO-B, L1
166   -- [x] More ticks along X-axis (I tried, but it does not behave as expected)
167   -- [x] Smaller footer credits
168   -- [x] Move the version to the footer
169   -- [x] Fix various issues with spacepy and CDF generation
170   -
171   -
172   -## 1.0.0-rc5
173   -
174   -- [x] Cache warmup (generate for today's default interval) `/cache/warmup`
175   -- [x] Improve the generated CDF for SAMP
176   -- [x] Enable Earth
177   -- [x] Enable more precise configuration of each models' parameters
178   -
179   -
180   -## 1.0.0-rc4
181   -
182   -- [x] Sort times series by closeness to the sun
183   -- [x] Generate a CDF file (not NetCDF)
184   -- [x] Normalize time interval for time series
185   -- [x] Make the footer images clickable
186   -- [x] Highlight the visits counter
187   -- [x] Use a default interval up to 3 weeks in the future
188   -- [x] Add interval constraints for orbit models (Rosetta uses P67 after a time)
189   -- [x] Make the download with a netcdf file instead of a tarball of CSVs
190   -- [x] Support having no position to display (for Rosetta in some intervals)
191   -- [x] Make the local cache more resilient to corrupted downloads
192   -- [x] Make the local cache more resilient to naming collisions
193   -
194   -
195   -## 1.0.0-rc3
196   -
197   -- [x] Make the targets dynamic in the orbit plot, allowing zoom
198   -- [x] Refactor some more to move as much as we can to the config
199   -- [x] Cache clear (remove all files) `/cache/clear`
200   -
201   -
202   -## 1.0.0-rc2
203   -
204   -- [x] Refactor and clean up
205   -- [x] Add loaders to targets' toggle button
206   -
207   -
208   -## 1.0.0-rc1
209   -
210   -- [x] Support multiple data and orbit models for each target
211   -- [x] Cache cleanup (remove old files) `/cache/cleanup`
212   -
213   -
214   -## 0.1.0
215   -
216   -- [x] Cache generated CSVs on the server side
217   -- [x] Cache generated CSVs on the client side
218   -- [x] Count visits
219   -- [x] Zoom in on time series
220   -- [x] Loader and targets loading animation
221   -- [x] Start/Stop datetime fields
222   -- [x] Retry CSV generation when it fails due to a bug in AMDA's API
223   -- [x] Remove duplicate NetCDFs from AMDA's API response
224   -- [x] Add a version number somewhere
225   -- [x] Move the visitors counter to the footer
226   -- [x] Download raw data (tarball of CSV) for current time interval and targets
227   -- [x] Download raw data as NetCDF for current everything, via SAMP
228   -- [x] Add a warning for users with javascript disabled
229   -
230   -
231   -## 0.0.0
232   -
233   -- [x] Initial website skeleton
234   -- [x] Initial data bridge between netCDF and CSV
235   -- [x] New parameters
236   - - [x] Temperature `T` (K)
237   - - [x] Density `N` (cm^-3)
238   - - [x] Angle Planet-Sun-Earth `Delta_angle` (degrees)
239   - - [x] Magnetism => B Tangential
240   -- [x] Planets
241   -- [x] Probes
242   - - [x] Rosetta
243   - - [x] Juno
244   -- [x] Comets (the one visited by rosetta, p67)
245   -- [x] Orbits axes titles
246   -- [x] Logo Europlanet
247   -- [x] Cache remote NetCDFs locally
248   -- [x] Add source name on time series
249   -- [x] Support multiple sources
250   -- [x] Support enabling/disabling sources
  1 +# Changelog
  2 +All notable changes to this project will be documented in this file.
  3 +
  4 +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
  5 +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
  6 +
  7 +Version numbering will follow those principles:
  8 +- MAJOR: for big changes, like inner architecture
  9 +- MINOR: for new functionnalities, like adding hardware and corresponding servers and clients.
  10 +- PATCH: when fixing bugs or adding very small details for previous MINOR functionnality.
  11 +
  12 +`Unreleased` version holds ongoing changes.
  13 +
  14 +Changes are kept under subsections:
  15 +- `New` for new features.
  16 +- `Changed` for changes in existing functionality.
  17 +- `Deprecated` for soon-to-be removed features.
  18 +- `Removed` for now removed features.
  19 +- `Fixed` for any bug fixes.
  20 +- `Security` in case of vulnerabilities.
  21 +
  22 +Should be noted only functionnal changes,
  23 +or major refactoring improvments.
  24 +
  25 +## [2.0-alpha] - On Going
  26 +### Fixed
  27 +### Changed
  28 +### New
... ...
README.md
... ... @@ -37,8 +37,9 @@ https://gitlab.irap.omp.eu/CDPP/SPACEWEATHERONLINE
37 37 ### Prerequisites
38 38 gcc
39 39 libncurses-dev
40   -python2
41   -virtualenv
  40 +python3
  41 +python3-virtualenv
  42 +libapache2-mod-wsgi-py3
42 43  
43 44 ### Python venv
44 45  
... ...
TODO.md 0 → 100644
... ... @@ -0,0 +1,250 @@
  1 +## Nicolas
  2 +
  3 +- [ ] rajouter MAVEN, New Horizons, Cassini, Galileo, ExoMars comme spacecraft cible
  4 +- [ ] ajouter un bouton ALERT qui permet d'ouvrir une nouvelle page de formulaire :
  5 + * email
  6 + * target (= planète, spacecraft, comet)
  7 + * submit (envoyé ensuite vers un webservice d'AMDA à construire)
  8 +- [ ] prévoir un bouton EPN-TAP ou l'on mettrait l'outil en relation avec le client VESPA développé par nathanaël
  9 +- [ ] séries temporelles en échelle log ou linéaire
  10 + /!\ D3 ne supporte pes les échelles log pour un domaine qui contient le 0.
  11 +- [ ] juno/rosetta doivent aussi bouger le long de leur orbite lorsque l'on parcourt à la souris les données de la série temporelle; pour les intervalles de temps où rosetta n'existe plus (crash à la surface de la comète) il faut qu'elle disparaisse; pour les intervalles de temps où juno est en orbite autour de jupiter il faut que juno suive jupiter
  12 + -> tout ceci est configurable dans le fichier de configuration, je n'ai pas les ids !
  13 +
  14 +- [ ] pour l'option jupiter thermospheric models dans l'onglet layer, une fois activée il faut que sur un tracé de la pression dynamique à jupiter tu fasses apparaître trois lignes horizontales en trois couleurs différentes pour les valeurs:
  15 + Model A compressed Pdyn=0.121 nPa
  16 + Model B baseline Pdyn=0.060 nPa
  17 + Model C expanded Pdyn=0.020 nPa
  18 +
  19 +
  20 +## CME Catalogs
  21 +
  22 +1) https://www.helcats-fp7.eu/catalogues/wp4_icmecat.html
  23 +et télécharger le catalogue en ASCII, JSON ou VOTAble XML
  24 +les traits verticaux à repérer sur les données Terre sont délimités par ICME_START_TIME et ICME_STOP_TIME, et il faut prendre le catalogue pour WIND uniquement (qui se trouver au point L1)
  25 +et prendre aussi
  26 +2) https://wind.nasa.gov/fullcatalogue.php
  27 +
  28 +
  29 +## Future ?
  30 +
  31 +- [ ] Rework the images of Rosetta and Juno
  32 +- [ ] Optimize data aggregation (numpy vectorization?)
  33 +- [ ] Bump D3JS to v5 (and its promises)
  34 +- [ ] Enable p67
  35 +- [ ] IE compat, if you can (mouahahahahaha good luck)
  36 +- [ ] Fix the warmup on the prod server (I was kicked out, do it yourselves)
  37 +- [ ] Set the log level to _error_ in production (see `web/run.py` -- DIY)
  38 +
  39 +
  40 +## 1.9
  41 +
  42 +- [x] Auroral Emissions (Jupiter)
  43 +- [x] Auroral Emissions Fixes
  44 +- [x] Enable the Input selector
  45 +
  46 +
  47 +## 1.8.3
  48 +
  49 +- [x] Fix whitespaces
  50 +
  51 +
  52 +## 1.8.2
  53 +
  54 +- [x] Fix Earth temperature
  55 +
  56 +
  57 +## 1.8
  58 +
  59 +- [x] Auroral Emissions (Saturn)
  60 +
  61 +
  62 +## 1.7
  63 +
  64 +- [x] Only get SWRT after OMNI
  65 +- [x] Fix Rosetta & Juno squatting the CDF Download
  66 +- [x] Layer : Models (disabled)
  67 +- [x] Layer : Campaigns (disabled)
  68 +- [x] Layer : Catalogs (disabled)
  69 +- [x] Layer : Inputs (disabled)
  70 +- [x] Solve the ticks' month issue
  71 +
  72 +
  73 +## 1.6
  74 +
  75 +- [x] Re-enable Earth
  76 +- [x] Layer : CME Catalogs
  77 +- [x] Add an About page
  78 +- [x] Rewrite everything using ES6 instead of Livescript
  79 +- [x] Force domain re-sizing of time series to be sequential
  80 +- [x] Fix broken, confusing ticks on time series
  81 +- [x] Make date format in time series saner (DOY)
  82 +
  83 +
  84 +## 1.5
  85 +
  86 +- [x] Use the new AMDA API
  87 +- [x] Add Mercury Real Time
  88 +- [x] Add Venus Real Time
  89 +
  90 +
  91 +## 1.4.1
  92 +
  93 +- [x] Add logs to hunt a Heisenbug
  94 +
  95 +
  96 +## 1.4
  97 +
  98 +- [x] Enable Uranus
  99 +- [x] Enable Neptune
  100 +
  101 +
  102 +## 1.3.1
  103 +
  104 +- [x] Disable Earth again
  105 +- [x] Fix the layers being shown outside the clipping area in the time series
  106 +
  107 +
  108 +## 1.3
  109 +
  110 +- [x] Earth pdyn = pv² (TBD)
  111 +- [x] Earth omnihour B is a Vector3, use the first scalar
  112 +- [x] Layers
  113 + - SW Catalogs
  114 +
  115 +
  116 +## 1.2
  117 +
  118 +- [x] Restore Earth
  119 +- [x] Clean NetCDF, stage 1
  120 +- [x] Accordion on the parameters list
  121 +- [x] Check IE compat
  122 +- [x] Bind the Alert button to a website
  123 +
  124 +
  125 +## 1.1
  126 +
  127 +- [x] Credit the author of the pixel art planets (`Jr Astronaut`)
  128 +- [x] … and buy his stuff from https://www.redbubble.com/people/spacefruitdox
  129 +- [x] Fix a small glitch with the time series cursor on zoom
  130 +
  131 +
  132 +## 1.0.1
  133 +
  134 +- [x] Fix an issue with the Time Series axes
  135 +- [x] CRON statements to call the cache cleanup and warmup
  136 +
  137 +
  138 +## 1.0.0
  139 +
  140 +- [x] Fix a bug with data that is offset by one hour.
  141 +- [x] Use `git describe` as version number
  142 +
  143 +
  144 +## 1.0.0-rc8
  145 +
  146 +- [x] Make the parameters' toogle buttons smaller
  147 +- [x] Set time format to 24h in the time series
  148 +- [x] Add the disabled versions of Uranus and Neptune
  149 +- [x] Add the `CME Catalogs` layer
  150 +
  151 +
  152 +## 1.0.0-rc7
  153 +
  154 +- [x] Add disabled layer buttons
  155 +- [x] Give the future data another color
  156 +- [x] Change the default interval (from 2 months in the past to one in the future)
  157 +- [x] Prepare horizontal lines in the time series
  158 +- [x] Add buttons to the orbits plot zoom to inner or outer heliosphere
  159 +- [x] Make the Y-Axis of time series dynamic (at the expense of animations)
  160 +
  161 +
  162 +## 1.0.0-rc6
  163 +
  164 +- [x] Re-lock Earth until we have better support
  165 +- [x] Add support for inputs STEREO-A, STEREO-B, L1
  166 +- [x] More ticks along X-axis (I tried, but it does not behave as expected)
  167 +- [x] Smaller footer credits
  168 +- [x] Move the version to the footer
  169 +- [x] Fix various issues with spacepy and CDF generation
  170 +
  171 +
  172 +## 1.0.0-rc5
  173 +
  174 +- [x] Cache warmup (generate for today's default interval) `/cache/warmup`
  175 +- [x] Improve the generated CDF for SAMP
  176 +- [x] Enable Earth
  177 +- [x] Enable more precise configuration of each models' parameters
  178 +
  179 +
  180 +## 1.0.0-rc4
  181 +
  182 +- [x] Sort times series by closeness to the sun
  183 +- [x] Generate a CDF file (not NetCDF)
  184 +- [x] Normalize time interval for time series
  185 +- [x] Make the footer images clickable
  186 +- [x] Highlight the visits counter
  187 +- [x] Use a default interval up to 3 weeks in the future
  188 +- [x] Add interval constraints for orbit models (Rosetta uses P67 after a time)
  189 +- [x] Make the download with a netcdf file instead of a tarball of CSVs
  190 +- [x] Support having no position to display (for Rosetta in some intervals)
  191 +- [x] Make the local cache more resilient to corrupted downloads
  192 +- [x] Make the local cache more resilient to naming collisions
  193 +
  194 +
  195 +## 1.0.0-rc3
  196 +
  197 +- [x] Make the targets dynamic in the orbit plot, allowing zoom
  198 +- [x] Refactor some more to move as much as we can to the config
  199 +- [x] Cache clear (remove all files) `/cache/clear`
  200 +
  201 +
  202 +## 1.0.0-rc2
  203 +
  204 +- [x] Refactor and clean up
  205 +- [x] Add loaders to targets' toggle button
  206 +
  207 +
  208 +## 1.0.0-rc1
  209 +
  210 +- [x] Support multiple data and orbit models for each target
  211 +- [x] Cache cleanup (remove old files) `/cache/cleanup`
  212 +
  213 +
  214 +## 0.1.0
  215 +
  216 +- [x] Cache generated CSVs on the server side
  217 +- [x] Cache generated CSVs on the client side
  218 +- [x] Count visits
  219 +- [x] Zoom in on time series
  220 +- [x] Loader and targets loading animation
  221 +- [x] Start/Stop datetime fields
  222 +- [x] Retry CSV generation when it fails due to a bug in AMDA's API
  223 +- [x] Remove duplicate NetCDFs from AMDA's API response
  224 +- [x] Add a version number somewhere
  225 +- [x] Move the visitors counter to the footer
  226 +- [x] Download raw data (tarball of CSV) for current time interval and targets
  227 +- [x] Download raw data as NetCDF for current everything, via SAMP
  228 +- [x] Add a warning for users with javascript disabled
  229 +
  230 +
  231 +## 0.0.0
  232 +
  233 +- [x] Initial website skeleton
  234 +- [x] Initial data bridge between netCDF and CSV
  235 +- [x] New parameters
  236 + - [x] Temperature `T` (K)
  237 + - [x] Density `N` (cm^-3)
  238 + - [x] Angle Planet-Sun-Earth `Delta_angle` (degrees)
  239 + - [x] Magnetism => B Tangential
  240 +- [x] Planets
  241 +- [x] Probes
  242 + - [x] Rosetta
  243 + - [x] Juno
  244 +- [x] Comets (the one visited by rosetta, p67)
  245 +- [x] Orbits axes titles
  246 +- [x] Logo Europlanet
  247 +- [x] Cache remote NetCDFs locally
  248 +- [x] Add source name on time series
  249 +- [x] Support multiple sources
  250 +- [x] Support enabling/disabling sources
... ...
heliopropa.wsgi 0 → 100644
... ... @@ -0,0 +1,42 @@
  1 +#
  2 +# Simple wsgi wrapper to run flask app through apache.
  3 +#
  4 +# Relies on an apache2 virtualhost configuration.
  5 +# See ./resources/apache2-virtual-host.conf
  6 +#
  7 +# It merely calls the app factory and exports it as
  8 +# the application variable.
  9 +
  10 +# The apache WSGIDaemonProcess allows us to set
  11 +# a virtualenv
  12 +# a pythonpath
  13 +
  14 +# Instead we could:
  15 +#
  16 +## 1- activate venv
  17 +# python_home = '/var/www/html/app-web/'
  18 +# activate_this = python_home + 'venv/bin/activate_this.py'
  19 +# with open(activate_this) as file_:
  20 +# exec(file_.read(), dict(__file__=activate_this))
  21 +#
  22 +## 2- set a python path
  23 +# sys.path.insert(0, '/var/www/html/app-web/')
  24 +#
  25 +## 3- set some logging facilities
  26 +# import logging, sys
  27 +# logging.basicConfig(stream=sys.stderr)
  28 +
  29 +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  30 +
  31 +#
  32 +# Main Part
  33 +#
  34 +
  35 +# simply use application already set in main app file
  36 +#
  37 +from web.run import app as application
  38 +
  39 +
  40 +
  41 +
  42 +# vim: ft=python
... ...
resources/apache.conf renamed to resources/apache-python2.conf
resources/apache-python3.conf 0 → 100644
... ... @@ -0,0 +1,76 @@
  1 +# Apache virtual host conf file for Heliopropa web-app
  2 +#
  3 +# Will map a server name and an url to the wsgi script.
  4 +#
  5 +# Allows to use a python virtualenvironment thanks to two WSGIDaemonProcess
  6 +# attributes:
  7 +# python-home
  8 +# python-path
  9 +
  10 +
  11 +# Edit Configuration
  12 +#
  13 +Define flaskapp_path /home/richard/00DEV/SPACEWEATHERONLINE
  14 +Define flaskapp_wsgiscript heliopropa.wsgi
  15 +Define flaskapp_server_name heliopropa
  16 +Define flaskapp_server_addr 127.0.0.1
  17 +Define flaskapp_subdir /
  18 +Define flaskapp_user www-data
  19 +Define flaskapp_group www-data
  20 +
  21 +# Warning:
  22 +# --------
  23 +#
  24 +# Stdout/Stderr wont be logged in per virtualhost log files.
  25 +#
  26 +# 1- Unsuccessfull tries to fix it:
  27 +#
  28 +# WSGIRestrictEmbedded On
  29 +# WSGIRestrictStdout Off
  30 +#
  31 +# 2- what works is to comment out ErrorLog, TransferLog and CustomLog
  32 +# and let apache log everything in global log files
  33 +#
  34 +# 3- However you should prefer to manage your own log system from inside web-app
  35 +#
  36 +#
  37 +<VirtualHost ${flaskapp_server_addr}:443>
  38 + # Add machine's IP address (use ifconfig command)
  39 + ServerName ${flaskapp_server_name}
  40 + # https stuf
  41 + #SSLEngine on
  42 + #SSLProtocol all -SSLv2
  43 + #SSLCertificateFile /etc/pki/tls/certs/localhost.crt
  44 + #SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
  45 + # Give an alias to to start your website url with
  46 + DocumentRoot ${flaskapp_path}
  47 + LogLevel warn
  48 + LogFormat "%a %l %u %t \"%r\" %>s %b"
  49 + #
  50 + # Virtualhost log config doesnt show stdout/err see before
  51 + # ErrorLog ${flaskapp_path}/flaskapp-error.log
  52 + # TransferLog ${flaskapp_path}/flaskapp-access.log
  53 + # CustomLog ${flaskapp_path}/flaskapp-custom.log combined
  54 +
  55 + # python-home is the virtual env path
  56 + # python-path sets the PYTHON_PATH for modules import
  57 + WSGIDaemonProcess ${flaskapp_server_name} \
  58 + user=${flaskapp_user} group=${flaskapp_user} \
  59 + processes=2 threads=5 \
  60 + python-home=${flaskapp_path}/venv \
  61 + python-path=${flaskapp_path} \
  62 + display-name=%{GROUP}
  63 + WSGIScriptAlias /${flaskapp_subdir} ${flaskapp_path}/${flaskapp_wsgiscript}
  64 + WSGIProcessGroup ${flaskapp_server_name}
  65 + WSGIApplicationGroup %{GLOBAL}
  66 + <Directory ${flaskapp_path}>
  67 + # set permissions as per apache2.conf file
  68 + Options -Indexes -MultiViews +FollowSymLinks
  69 + AllowOverride All
  70 + Require all granted
  71 + </Directory>
  72 +</VirtualHost>
  73 +
  74 +
  75 +
  76 +# vim: tabstop=4 sw=4 et tw=0
... ...
web/run.py
... ... @@ -53,7 +53,9 @@ with open(get_path(&#39;../VERSION&#39;), &#39;r&#39;) as version_file:
53 53 version = version_file.read().strip()
54 54  
55 55 # CONFIG
56   -with open(get_path('../config.yml'), 'r') as config_file:
  56 +
  57 +
  58 +with open(get_path('../config.yml'), 'r', encoding='utf8') as config_file:
57 59 config = yaml_load(config_file.read(), Loader=Loader)
58 60  
59 61 FILE_DATE_FMT = "%Y-%m-%dT%H:%M:%S"
... ...