p5.js-web-editor/README.ruben.md

51 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2020-09-22 06:26:54 +00:00
# Usage
There is a hidden link to have an overview of all users registered on the server: `/users`.
2020-09-22 06:26:54 +00:00
# Development
`docker-compose -f docker-compose-development.yml up`
# Deployment
2020-12-17 09:58:41 +00:00
## Manual
2020-09-22 06:26:54 +00:00
* Push to git (in case linting fails on commit use `git commit --no-verify`)
* Pull on server.
* `service p5.js-web-editor stop`
* `npm run build:server`
* `npm run build:client`
* `service p5.js-web-editor start`
2020-12-17 09:58:41 +00:00
## Docker
Branch `single_docker` has a Frankenstein Dockerfile to embed mongo in the single image for deployment to Plex (which doesn't know docker-compose...)
To build an image called `digitalplayground`:
`docker build -t digitalplayground .`
To run it we provide the port to publish, and need to map the volumes of mongo for persistent storage (don't use the tmp folder from the example if you really want persistent storage):
2020-12-21 11:34:24 +00:00
`docker run -it --env-file .env.production --publish 8001:8000 -v /tmp/dp/db:/data/db -v /tmp/dp/configdb:/data/configdb --name dp_app digitalplayground`
2020-12-17 09:58:41 +00:00
Export the image using:
`docker save digitalplayground > dp_docker.tar`
2020-12-17 09:58:41 +00:00
## s3 storage
Gebruik s3cmd om bucket in te stellen.
2020-12-17 09:58:41 +00:00
### Make bucket:
s3cmd mb s3://digitalplayground-p5
2020-12-17 09:58:41 +00:00
### Set the CORS rules
s3cmd -c .s3cfg setcors CORS.xml s3://digitalplayground-p5
2020-12-17 09:58:41 +00:00
### Delete the CORS rules
s3cmd -c .s3cfg delcors s3://digitalplayground-p5
2020-12-17 09:58:41 +00:00
### Get bucket info including CORS rules
s3cmd -c .s3cfg info s3://digitalplayground-p5