summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-10-13 19:34:34 +0200
committerJules Laplace <julescarbon@gmail.com>2021-10-13 19:34:34 +0200
commitd57c652dc7aa3876c0b206d2ecd7b671ffd67a68 (patch)
tree2441451ef4e0d12ce64eb4b0c3887f3e8bb1f652 /README.md
parent049a2618ea29a230b48cffe3814d8f39904ad915 (diff)
readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md62
1 files changed, 62 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6977640
--- /dev/null
+++ b/README.md
@@ -0,0 +1,62 @@
+# bucky
+
+## Install
+
+### osx
+
+```bash
+yarn install
+brew install mysql (used for main database)
+```
+
+### MySQL
+
+```sql
+mysql -uroot
+CREATE USER 'carbon'@'localhost' IDENTIFIED BY 'the_password';
+CREATE DATABASE bucky;
+USE bucky;
+GRANT ALL PRIVILEGES ON bucky.* TO 'carbon'@'localhost';
+```
+
+Copy .env-sample to .env and edit the values accordingly.
+
+PLEASE change the value of S3_PATH to if you reuse S3 buckets.
+
+#### Loading an old bucky db dump
+
+```bash
+mysql -u carbon -p bucky < bucky-20150903.sql
+```
+
+### MongoDB
+
+MongoDB is used in production as session store, but another session middleware can be substituted (it would be nice to not use Mongo). By default `SESSIONS_IN_MEMORY=yes` in the .env will use the default memorystore from Express, but this is not ideal for something accessible publicly on the open internet.
+
+### Berkeley DB
+
+Used for the search, `libdb` should already be installed on your system.
+
+## Building the search index
+
+This script should be run regularly to keep the search index fresh:
+
+```bash
+npm run build:search
+```
+
+## Running
+
+You may have to include the .so files for bdb: `export LD_LIBRARY_PATH=/var/www/bucky.asdf.us/bucky3/node_modules/berkeleydb/lib`
+
+```bash
+npm start
+```
+
+Server will be running at http://localhost:5000/ aka http://lvh.me:5000/ (or whatever port you set in the .env)
+
+### Production
+
+In production I use something to daemonize the node server, such as pm2 (provides nice dashboard with uptime, restarts, saves logs, etc).
+
+In .env, set `NODE_ENV=production` :)