Skip to content

Latest commit

 

History

History
187 lines (124 loc) · 3.62 KB

README.md

File metadata and controls

187 lines (124 loc) · 3.62 KB

douitsu

Identity management service.

Setup

cp options.example.js options.mine.js
npm install

Edit options.mine.js as needed, including switching on/off feature flags.

Environment variables

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

Run

node app.js

And open localhost:3333

Mem store and fixture data

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 and Redis

Install schema

mysql -u douitsu -p douitsu < mysql/douitsu.ddl

Running with MySQL and Redis

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

Admin

Open localhost:3333, login with an admin user (admin credentials defined in options.mine.js) and go to localhost:3333/admin.

Testing OAuth Provider

Follow README in example-oauth2orize-consumer.

Gulp

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

Install globally

npm i -g gulp

Run

Make sure to run gulp in the background when making file changes:

gulp

To build without watching for file changes:

gulp build

Bower

Install globally

npm install -g bower

Run

Front-end dependencies are defined in bower.js and will be placed in public/bower_components (see .bowerrc).

bower install

Themes

Style

Create your custom stylesheet under /css/theme, for example dark.css, and edit options.mine.js.

theme {
	style: '/css/theme/dark.css'
}

Logo

Edit options.mine.js.

theme {
	logo: 'http://cdn.shopify.com/s/files/1/0201/1862/t/2/assets/logo.png'
}

Locale

Create your custom locales under /public/locales/{language}, for example /en/example.json, and edit options.mine.js.

theme {
	locale: {
      namespace: 'example'
  }
}

Custom Pages

Create your custom pages under /views/theme, for example dialog.ejs, and edit options.mine.js.

theme {
	page: {
      dialog: 'theme/example/dialog'
  }
}

docker

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"

Licensing

douitsu is licensed under the MIT License. See LICENSE for the full license text.