summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-08-16 14:40:34 +0200
committerJules Laplace <julescarbon@gmail.com>2021-08-16 14:40:34 +0200
commit9ae202820b698796f93b929b3e30cd499de796a1 (patch)
tree3bec25bffed8e1a3a8fdf4270fb748b3f2fafdca /README.md
init site
Diffstat (limited to 'README.md')
-rw-r--r--README.md84
1 files changed, 84 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..b8eae67
--- /dev/null
+++ b/README.md
@@ -0,0 +1,84 @@
+# No6092
+
+Charles Stankievech
+
+## Installation
+
+```bash
+npm install -g yarn
+yarn install
+```
+
+## Development
+
+To run the server:
+
+```bash
+yarn server
+```
+
+The server will be running on http://localhost:3000/ and the admin pages are on http://localhost:3000/admin/
+
+When you start editing, be sure to pull the most recent changes before you do anything:
+
+```bash
+git pull
+```
+
+If you add any new files, add them so git will keep track of them:
+
+```bash
+git add -A
+```
+
+Commit changes with git, and then push them:
+
+```bash
+git commit -am "adding some changes"
+git push
+```
+
+Always please commit and push when you stop working! Otherwise we might have merge conflicts and it will be annoying :)
+
+## Production
+
+To log into the server, simply `ssh km@km`
+
+The site runs in production using `pm2`.
+
+### Starting the first time
+
+If the server ever restarts, you can restart the KM site this way:
+
+```bash
+pm2 start index.js --name km
+```
+
+### Synchronizing
+
+You should not update your database locally if you can help it. If this cannot be avoided, log into the server first, commit changes there and then push them. Then pull locally, which will update your database with the latest changes.
+
+To synchronize images with the server, run this command at any time:
+
+```bash
+yarn sync
+```
+
+### Updating the site
+
+First, push your local changes:
+
+```bash
+yarn sync
+git commit -am 'updating the database'
+git push
+```
+
+Then on the server, pull changes and restart it:
+
+```bash
+ssh km@km
+cd km-galerie
+git pull
+pm2 restart km
+```