diff --git a/.gitignore b/.gitignore index b1db62e..1093d12 100644 --- a/.gitignore +++ b/.gitignore @@ -110,6 +110,9 @@ $RECYCLE.BIN/ # Windows shortcuts *.lnk +# IntelliJ +.idea + ### Project ### idp-private-key.pem diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6948789 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +language: bash +services: + - docker +addons: + apt: + packages: + - docker-ce +sudo: required + +env: + global: + - DOCKER_IMAGE=mcguinness/saml-idp + +before_install: + - tagCommit=`echo ${TRAVIS_COMMIT} | sed "s|/|-|"` + - export DOCKER_IMAGE_COMMIT=${DOCKER_IMAGE}:${TAG_COMMIT} + +script: docker build . -t ${DOCKER_IMAGE_COMMIT} + +before_deploy: + - export DOCKER_IMAGE_TAG=${DOCKER_IMAGE}:${TRAVIS_TAG} + - echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin + +deploy: + - provider: script + script: + docker tag ${DOCKER_IMAGE_COMMIT} ${DOCKER_IMAGE_TAG} && + docker push ${DOCKER_IMAGE_TAG} + on: + tags: true diff --git a/Dockerfile b/Dockerfile index 29a125e..2201bbc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,4 +14,9 @@ ADD ./idp-public-cert.pem idp-public-cert.pem ADD ./idp-private-key.pem idp-private-key.pem ADD ./public public -ENTRYPOINT [ "node", "app.js", "--acs", "https://foo.okta.com/auth/saml20/example", "--aud", "https://www.okta.com/saml2/service-provider/spf5aFRRXFGIMAYXQPNV" ] +ENTRYPOINT [ \ + "--host", "0.0.0.0", \ + "node", "app.js", \ + "--acs", "https://foo.okta.com/auth/saml20/example", \ + "--aud", "https://www.okta.com/saml2/service-provider/spf5aFRRXFGIMAYXQPNV" \ +] diff --git a/README.md b/README.md index 0b23bff..3507005 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,12 @@ npm install saml-idp ### Docker +```bash +docker pull mcguinness/saml-idp:VERSION +``` + +#### Local + 1. docker-compose build 2. docker-compose up