From 9ae202820b698796f93b929b3e30cd499de796a1 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 16 Aug 2021 14:40:34 +0200 Subject: init site --- README.md | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 README.md (limited to 'README.md') 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 +``` -- cgit v1.2.3-70-g09d2