summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md38
1 files changed, 25 insertions, 13 deletions
diff --git a/README.md b/README.md
index e1a2c1d0..e8c5731b 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ pip install numpy Pillow
pip install dlib
pip install requests simplejson click pdfminer.six
pip install urllib3 flask flask_sqlalchemy mysql-connector
-pip install pymediainfo tqdm opencv-python imutils
+pip install pymediainfo tqdm opencv-python imutils watchdog
pip install scikit-image python-dotenv imagehash scikit-learn colorlog
pip install celery keras tensorflow
pip install python.app # OSX only! needed for matplotlib
@@ -38,28 +38,40 @@ You may need to set the database charset to `utf8mb4` in order to import the CSV
ALTER DATABASE megapixels CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
```
-## Building the site
+## Development: automatic rebuilds
-The most recently built copy of the site is kept in the repo. This is generated directly from NextCloud. Be mindful that NextCloud will create extra copies of things if there are merge conflicts.
+In development, we can watch a bunch of things and rebuild stuff automatically. These rebuild the HTML and the Javascript:
```
-npm install
-npm run build
-cd megapixels
-python cli_faiss.py sync_metadata
-python cli_faiss.py build_faiss
-python cli_faiss.py build_db
-python cli_site.py build
+python cli_site.py watch
+npm run watch
```
-## Running the site
+## Running the various servers
-On OSX, you must run the server with `pythonw` because of matplotlib.
+Run the web server, which will serve some HTML (you will need to add index.html to URLs... alas!):
```
python cli_flask.py run
+```
+
+These servers must be running to use all features of the site (face search, etc.)
+
+```
python `which celery` worker -A app.server.tasks --loglevel=info -E
redis-server /usr/local/etc/redis.conf
-npm run watch
```
+Note: On OSX, you must run the server with `pythonw` because of matplotlib.
+
+## Building the site for production
+
+```
+npm install
+npm run build
+cd megapixels
+python cli_faiss.py sync_metadata
+python cli_faiss.py build_faiss
+python cli_faiss.py build_db
+python cli_site.py build
+```