Identity management service.
cp options.example.js options.mine.js
npm install
Edit options.mine.js as needed, including switching on/off feature flags.
The following environment variables override what's defined in options.mine.js if they are set.
Environment variable | Description | Example |
---|---|---|
NODE_ENV | Platform environment | production |
DB_URL | Database URL | mysql://douitsu:douitsu@localhost:3306/douitsu |
CACHE_URL | Redis URL | redis://localhost |
LDAP_URL | LDAP URL | ldap://localhost/dc=ec2,dc=internal |
node app.js
And open localhost:3333
When not running in production mode then the mem store will be used and the fixture data defined in fixtures.js will be applied.
mysql -u douitsu -p douitsu < mysql/douitsu.ddl
When running in production mode then MySQL and Redis will be used.
NODE_ENV=production node app.js
Run with --fixtures to apply the fixture data defined in fixtures.js.
NODE_ENV=production node app.js --fixtures
Open localhost:3333, login with an admin user (admin credentials defined in options.mine.js) and go to localhost:3333/admin.
Follow README in example-oauth2orize-consumer.
Gulp does the following:
- Lint JavaScript files
- Concatenate JavaScript files
- Minify and rename said concatenated files
- Watch for file changes and do the above on the fly
npm i -g gulp
Make sure to run gulp in the background when making file changes:
gulp
To build without watching for file changes:
gulp build
npm install -g bower
Front-end dependencies are defined in bower.js and will be placed in public/bower_components (see .bowerrc).
bower install
Create your custom stylesheet under /css/theme, for example dark.css, and edit options.mine.js.
theme {
style: '/css/theme/dark.css'
}
Edit options.mine.js.
theme {
logo: 'http://cdn.shopify.com/s/files/1/0201/1862/t/2/assets/logo.png'
}
Create your custom locales under /public/locales/{language}, for example /en/example.json, and edit options.mine.js.
theme {
locale: {
namespace: 'example'
}
}
Create your custom pages under /views/theme, for example dialog.ejs, and edit options.mine.js.
theme {
page: {
dialog: 'theme/example/dialog'
}
}
Deployment and local testing is done using docker.
To build an image.
make build
To test locally.
make local
To deploy
make deploy
To point to a docker in a vm use.
export DOCKER_ARGS="-H crusty.local:5555"
douitsu is licensed under the MIT License. See LICENSE for the full license text.