Docker with Express.js OAuth2 Client
Install Docker
For Windows or Mac users: open https://www.docker.com/get-started in your browser.
For Linus users: install Docker with:
curl -sSL https://get.docker.com | sh
sudo adduser [yourusername] docker
Build the Docker image
If you have proxy caches for apt-get and npm you should build my baseimage (or baseimage-arm32v7 for Raspberry Pi 3) and nodejs before building the image.
$ docker build -t uwegerdes/oauth2-client .
Run the Docker container
Run the container with:
$ docker run -it --rm \
-v $(pwd):/home/node/app \
-p 8080:8080 \
-p 8081:8081 \
--name oauth2-client \
uwegerdes/oauth2-client \
bash
You should start npm start
or npm run dev
and open localhost:8080 for the server, localhost:8081 is the livereload port.
Restart it later with:
$ docker start -ai oauth2-client
Configuring Client
At the moment only an authorization at github is implemented. See /modules/login
for implementation.
Using oauth2-client
Open http://localhost:8080/login/
in your preferred browser.