@@ -36,4 +36,54 @@ will complain about your proposed feature.
36
36
37
37
## Deployment
38
38
39
+ We deploy two websites. One for production and one for development. In both
40
+ cases, the process is the same, the only difference being the branch being used
41
+ to run the server.
42
+
43
+ Deploying a website involves :
44
+
45
+ - cloning the repository and setting up the virtual environment,
46
+ - configuring nginx with a base setup listening on port 80 and then adding https
47
+ support with a SSL certificate
48
+ - wrapping the start/stop of the taipy server with a systemd service
49
+
50
+ ### Cloning and virtual environment
51
+
52
+ First clone the repository :
53
+
54
+ ```
55
+ cd /opt/d4g
56
+ git clone https://github.com/dataforgoodfr/12_taxobservatory_dataviz.git
57
+ cd 12_taxobservatory_dataviz
58
+ ```
59
+
60
+ If you want to deploy the development website, you must checkout the ` dev `
61
+ branch. If you want to deploy the production website, you must checkout the
62
+ ` main ` branch.
63
+
64
+ ```
65
+ git checkout dev # For development website
66
+ git checkout main # For production website
67
+ ```
68
+
69
+ You can then create a local virtual environment, install poetry as well as the
70
+ project dependencies :
71
+ ```
72
+ . ./d4g-utils/install_poetry.sh
73
+ ```
74
+
75
+ We need some extra packages for the deployment :
76
+
77
+ ```
78
+ source .venv/bin/activate
79
+ pip install uwsgi gevent
80
+ ```
81
+
82
+ ### Nginx setup
83
+
39
84
TBD
85
+
86
+ ### Systemd service file
87
+
88
+ TBD
89
+
0 commit comments