Connect people in real-time chat rooms that are filtered using a survey.
- socket.io to manage websockets
- surveyjs for rendering forms
- docker-compose for containerization
docker-compose up
For development, the server/
and client/
directories have their own docker containers, which are configured via the docker-compose.yml
file.
The client server is spun up at localhost:3000
and it proxies internally to the server using the linked name as server:8080
.
The local directories are mounted into the containers, so changes will reflect immediately. However, changes to package.json will likely need to a rebuild: docker-compose down && docker-compose build && docker-compose up
.
docker-compose -f docker-compose.prod.yml up
For production, this uses the Dockerfile at the root of the repo. It creates a static build of the client React app and runs Express inside server, which handles both the API and serving of React files.
Login and create app
heroku login
heroku create --app <app-server-name>
heroku container:login
Build image and push to registry
docker-compose -f docker-compose.prod.yml build
docker tag <app-server-name> registry.heroku.com/<app-server-name>/web
docker push registry.heroku.com/<app>/<process-type>
Alt build/push image (using heroku.yml):
heroku container:push web --app <app-server-name>
Release and verify app
heroku container:release web --app <app-server-name>
heroku open --app <app-server-name>
- Use volume for chat history rentention
- Display number of users in chat
- Set user name and bio
- Set room and hashed survey state in url