diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 36 |
1 files changed, 23 insertions, 13 deletions
@@ -38,28 +38,38 @@ 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 - -On OSX, you must run the server with `pythonw` because of matplotlib. +In addition, run the server, which will serve some HTML (you may 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 +``` |
