- Express.js node.js framework
- Nunjucks templating engine
- Sequelize.js ORM for MySQL
- Docker for development and deployment
Prerequisites
You need a docker machine setup, up and running for development
-
Checkout
-
Run
goatbinary at the project root
$ ./goat
- Open the docker-machine ip address in the browser to see the app running
To view debug logs from the docker container running node app, open a new terminal and run:
$ docker-compose logs -f web
The goat file watcher uses config from
goat.ymland starts up the docker containers needed for development usingdocker-compose. See thedocker-compose.ymlfor more details.
Deployment scripts and configs are in the deploy folder and the deploy.sh script should be run from there.
This setup is for deploying the dockerized app on Marathon running on a DC/OS cluster. Assumes you have
dcoscli installed and configured.
Usage: ./deploy.sh env init|update tag
- env - can be
stagingorproduction. See marathon configs in/deploydirectory - tag - can be
latestor a release tag like1.2.0
# Create a new marathon app on staging
./deploy.sh staging init latest
# Update a existing marathon app on staging
./deploy.sh staging update latest
Docker hub image: jinmatt/sumoqs
env variables are used for runtime configurations:
-
ADMIN_PASS- The dashboard login access password can be set using this env variable -
SESSION_SECRET- This env variable is used to set secret key for generating signed secure cookies for session management for guest users coming on the website
See
docker-compose.ymlto change these in development, andstaging.jsonorproduction.jsonin/deployfor deployments.
More app init configurations can be managed or added in
/config. By default the app starts with the init configdefault.json