@@ -14,17 +14,17 @@ Requires [Node.js 20 or above](https://nodejs.org/en/).
1414npm start
1515```
1616
17- The site will be available at < http://localhost:5000/ > , using a mock
18- Google authentication server and an in-memory database.
17+ The site will be available at < http://localhost:5000/ > , using a mock Google
18+ authentication server and an in-memory database.
1919
2020See [ CONTRIBUTING.md] ( docs/CONTRIBUTING.md ) for full guidance on local
2121development.
2222
2323## Building for deployment
2424
2525You can find pre-built releases at
26- [ Refacto/releases] ( https://github.com/davidje13/Refacto/releases ) ,
27- or you can build your own:
26+ [ Refacto/releases] ( https://github.com/davidje13/Refacto/releases ) , or you can
27+ build your own:
2828
2929``` sh
3030npm run build
@@ -36,49 +36,77 @@ The output is placed in `build`.
3636
3737### With Docker
3838
39- You can deploy using the [ Docker Hub image] ( https://hub.docker.com/r/refacto/refacto ) :
39+ You can deploy using the
40+ [ Docker Hub image] ( https://hub.docker.com/r/refacto/refacto ) :
4041
4142``` sh
4243docker run -d -e INSECURE_SHARED_ACCOUNT_ENABLED=true -p 5000:5000 refacto/refacto
4344```
4445
45- (see the image details for information on how to configure and secure docker deployments).
46+ (see the image details for information on how to configure and secure docker
47+ deployments).
4648
4749### Without Docker
4850
4951You will need to have Node.js 20 or newer installed in the deployment
5052environment.
5153
52- [ Download and unpack a release] ( https://github.com/davidje13/Refacto/releases ) (or
53- [ build your own] ( #building-for-deployment ) ), then in the release directory run:
54+ [ Download and unpack a release] ( https://github.com/davidje13/Refacto/releases )
55+ (or [ build your own] ( #building-for-deployment ) ), then in the release directory
56+ run:
5457
5558``` sh
5659npm install --omit=dev
5760INSECURE_SHARED_ACCOUNT_ENABLED=true ./index.js
5861```
5962
63+ ### Provisioning
64+
65+ Refacto does not require much CPU or RAM allocated to run smoothly. You should
66+ be able to provision the minimum available CPU on your platform of choice, and
67+ at least 0.5GB RAM (provision 1GB if you expect very heavy usage). One area
68+ which can be improved by allocating more CPU is the password login: this will be
69+ noticeably faster with more CPU resource available (or you can
70+ [ enable more hashing rounds] ( ./docs/SECURITY.md#work-factor ) to increase
71+ security).
72+
73+ Note that because Refacto uses Web Sockets for live collaboration, you will need
74+ to ensure your deployment is capable of holding open a large number of
75+ simultaneous connections (at least one per expected concurrent user, plus some
76+ extra for static asset and API requests). For small deployments this is not a
77+ concern, as the defaults are usually ample.
78+
79+ You should _ not_ enable any auto-scaling provided by your platform. Where
80+ possible, set the maximum number of instances to 1 (note that some platforms
81+ enable auto-scaling by default). For efficiency reasons, Refacto needs all
82+ participants in a particular retro to be connected to the same server, otherwise
83+ they will not see each other's changes in real time. Most deployments will not
84+ need more than a single small instance to run Refacto successfully, but if you
85+ have a very high load and _ need_ additional instances, see
86+ [ Load Balancing in the services documentation] ( docs/SERVICES.md#load-balancing )
87+ for an example of how to correctly load balance using an NGINX reverse proxy.
88+
6089### Configuration
6190
6291By default:
6392
64- - no authentication providers are available (setting ` INSECURE_SHARED_ACCOUNT_ENABLED `
65- means everybody who can access the site will be able to see all retros);
66- - an in-memory database is used
67- (all data will be lost when the process ends);
68- - blank secrets are used for encryption and password hashing
69- (you can use ` ./scripts/random-secrets.mjs ` to generate a set of
70- secure random secrets for a deployment);
93+ - no authentication providers are available (setting
94+ ` INSECURE_SHARED_ACCOUNT_ENABLED ` means everybody who can access the site will
95+ be able to see all retros);
96+ - an in-memory database is used (all data will be lost when the process ends);
97+ - blank secrets are used for encryption and password hashing (you can use
98+ ` ./scripts/random-secrets.mjs ` to generate a set of secure random secrets for
99+ a deployment);
71100- Giphy integration is not enabled;
72101- haveibeenpwned integration _ is_ enabled;
73102- the server listens on port ` 5000 ` .
74103
75- See [ SERVICES.md] ( docs/SERVICES.md ) and
76- [ SECURITY.md ] ( docs/SECURITY.md ) for details.
104+ See [ SERVICES.md] ( docs/SERVICES.md ) and [ SECURITY.md ] ( docs/SECURITY.md ) for
105+ details.
77106
78- The full list of recognised configuration options (and their default
79- values) can be found in
80- [ config/default.ts] ( ./backend/src/config/default.ts )
81- (nested properties are joined and written in ` UPPER_SNAKE_CASE ` ).
107+ The full list of recognised configuration options (and their default values) can
108+ be found in [ config/default.ts] ( ./backend/src/config/default.ts ) (nested
109+ properties are joined and written in ` UPPER_SNAKE_CASE ` ).
82110
83111Typical values to configure are:
84112
@@ -103,10 +131,10 @@ TOKEN_SECRET_PASSPHRASE="<value-from-random-secrets.mjs>" \
103131
104132## Services
105133
106- See the [ services documentation] ( docs/SERVICES.md ) for details on
107- setting up a database and integrating with authentication providers.
134+ See the [ services documentation] ( docs/SERVICES.md ) for details on setting up a
135+ database and integrating with authentication providers.
108136
109137## Extra security
110138
111- See the [ security documentation] ( docs/SECURITY.md ) for details on
112- configuring additional security for deployments.
139+ See the [ security documentation] ( docs/SECURITY.md ) for details on configuring
140+ additional security for deployments.
0 commit comments