Skip to content

Gatehouse is a very simple server for sso based on json web tokens

License

Notifications You must be signed in to change notification settings

trutvo/gatehouse

This branch is 21 commits behind thomasvolk/gatehouse:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

027d4dd · Sep 17, 2019
Jul 17, 2019
Jul 4, 2019
Jul 17, 2019
Sep 10, 2019
Aug 6, 2018
Aug 2, 2018
Sep 17, 2019
Jul 30, 2019
Aug 10, 2019
Jul 2, 2019
Jul 4, 2019
Mar 30, 2018
Sep 17, 2019
Aug 5, 2019
Jun 14, 2019
Mar 30, 2018
Aug 5, 2019
Aug 10, 2019
Jul 30, 2019
Aug 5, 2019
Jul 4, 2019

Repository files navigation

Gatehouse

quickstart

To try out gatehouse you can run it within a docker container:

docker-compose up

now you can add an adminstration user:

after that you can test the login function by opening the example application:

development

To start your Phoenix server:

Start the database with

docker-compose -f docker-compose-development.yaml up

Install dependencies with

mix deps.get

Create and migrate your database with

mix ecto.create && mix ecto.migrate

Install Node.js dependencies with

(cd assets && npm install)

Start Phoenix endpoint standalone

mix phx.server

or within the console

iex -S mix

Now you can visit localhost:4000 from your browser and register the admin user.

You can test the sso function by open the demo server on localhost:8001.

Ready to run in production? Please check our deployment guides.

test

Start the integrationtest application:

./example/python/webserver.py

Open the url localhost:8000 from your browser.

ATTENTION: Use the 'dev' environment for testing only!

create migration script

If you change the database model, you have to create a migration script:

mix ecto.gen.migration {{ my_change_description }}
mix ecto.migrate

release

build and run the docker container

Run the build script to compile and pack the gatehouse archive file:

./build.sh

To create the docker container run the release script:

./build-docker-release.sh

Yous can test the release with the local test database:

docker-compose up

Open gatehose with http://localhost:9998

docker container environment variables

To run the release you must set the following environment variables:

Name Description
GATEHOUSE_DATABASE_URL database host name
GATEHOUSE_DB_NAME database name
GATEHOUSE_DB_USER database user name
GATEHOUSE_DB_PASSWORD database user passoerd
GATEHOUSE_DB_PORT database port
GATEHOUSE_WEB_SECRET_KEY_BASE webserver secret key base
GATEHOUSE_AUTH_SECRET_KEY authentication secret key
GATEHOUSE_AUTH_TOKEN_TTL authentication token time to live

Learn more

About

Gatehouse is a very simple server for sso based on json web tokens

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir 53.0%
  • JavaScript 34.6%
  • HTML 7.5%
  • Python 3.3%
  • Shell 1.3%
  • Dockerfile 0.2%
  • CSS 0.1%