summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2025-10-14 08:41:58 +0300
committerA Farzat <a@farzat.xyz>2025-10-14 08:41:58 +0300
commit9de3b56b9f6366d9d3907f00601be7bf984903fb (patch)
tree16c28f3bf8e0833421ebcbbf4f3c4bc6e02fa807 /README.md
parenta18800eb317b0cfde2b775215894c96d921e0756 (diff)
downloadcsca5028-9de3b56b9f6366d9d3907f00601be7bf984903fb.tar.gz
csca5028-9de3b56b9f6366d9d3907f00601be7bf984903fb.zip
Add deployment instructions
Diffstat (limited to 'README.md')
-rw-r--r--README.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/README.md b/README.md
index 0e0da47..c4a22d4 100644
--- a/README.md
+++ b/README.md
@@ -396,3 +396,25 @@ This requirement is achieved by the GitHub workflow stored in `.github/workflows
which properly builds the react application from jsx to browser-readable js, exports
the output as a container (artifact), and then deploys the resulting website to
GitHub pages.
+
+### How to deploy yourself
+
+First of all, make sure to set the environment variables, either directly or by
+writing to a `.env` file at the root directory. The expected environment variables
+are `MONGO_USER`, `MONGO_PASS`, `RABBIT_USER`, `RABBIT_PASS`, `VITE_API_BASE_URL`,
+and `YOUTUBE_API_KEY`. The `VITE_API_BASE_URL` is the URL from which to access the
+API flask server, while `YOUTUBE_API_KEY` is only needed if running from a non-residential
+server.
+
+Next, make sure to have the docker containers up and running by executing `docker-compose
+up` at the root directory.
+
+To install the python dependencies, run `pip install -r requirements.txt`.
+
+The data collector and data analyser scripts are started by running `python -m data_collector`
+and `python -m data_analyser` respectively.
+
+For non-production, the API back-end can be started by running `flask --app api:app
+run`. For production use, make sure to use gunicorn instead. The command I used is:
+`gunicorn --workers 3 --bind unix:/srv/csca5028/flask.sock --umask 007
+--access-logfile - --error-logfile - api:app`.