From a58fd8852eb5e82fa2b16376bbc1e7d4c95e4f39 Mon Sep 17 00:00:00 2001 From: longze chen Date: Mon, 19 Nov 2018 08:09:39 -0500 Subject: [PATCH] Update README.md - How to run fakeCAS with OSF using docker-compose - How to switch to the `develop` image - How to develop fakeCAS --- README.md | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3a094cd..94bf3ff 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,33 @@ -# Fake CAS +# Run fakeCAS with OSF -Download the binary from [here](https://github.com/CenterForOpenScience/fakecas/releases/latest) +Please follow [README-docker-compose.md](https://github.com/CenterForOpenScience/osf.io/blob/develop/README-docker-compose.md) to run fakeCAS with OSF. -```bash -cd ~/Downloads # cd to where you downloaded the file to -chmod +x fakecas # Make the server executable -./fakecas # Run the server +## Change the Image -./fakecas -h # Print possible configuration options -# Usage of ./fakecas: -# -dbaddress="localhost:27017": The address of your mongodb. ie: localhost:27017 -# -dbname="osf20130903": The name of your OSF database -# -host="localhost:8080": The host to bind to -# -osfhost="localhost:5000": The osf host to bind to +By default, OSF uses the `master` image of fakeCAS, as shown below in [docker-compose.yml](https://github.com/CenterForOpenScience/osf.io/blob/develop/docker-compose.yml). + +```yml +################################## +# Central Authentication Service # +################################## + +fakecas: + image: quay.io/centerforopenscience/fakecas:master + command: fakecas -host=0.0.0.0:8080 -osfhost=localhost:5000 -dbaddress=postgres://postgres@postgres:5432/osf?sslmode=disable + restart: unless-stopped + ports: + - 8080:8080 + depends_on: + - postgres + stdin_open: true ``` + +If you need the `develop` one, use `quay.io/centerforopenscience/fakecas:develop` instead. Run `docker-compose pull fakecas` to pull the new image before starting `docker-compose pull fakecas`. + +## Pre-docker-compose + +Starting [18.0.0](https://github.com/CenterForOpenScience/fakecas/milestone/1), fakeCAS no longer provides downloadable binrary executables. Here is the last version [0.11.1](https://github.com/CenterForOpenScience/fakecas/releases/tag/0.11.1) that provides such a binary. + +# Develop fakeCAS + +Please take a look at the [Dockerfile](https://github.com/cslzchen/fakecas/blob/develop/Dockerfile) for how to develop fakeCAS locally. On macOS, use [`brew`](https://github.com/Homebrew/brew) to install [`go`](https://github.com/golang/go) and [`glide`](https://github.com/Masterminds/glide).