diff --git a/README-WIN.md b/README-WIN.md index bc6ec08..2a20a9a 100644 --- a/README-WIN.md +++ b/README-WIN.md @@ -16,14 +16,16 @@ The environmental variables must be passed separately on Windows, followed by th setx OAUTH_CLIENT_ID = "<... required ...>" setx OAUTH_CLIENT_SECRET = "<... required ...>" setx OAUTH_URL_CALLBACK = "http://localhost/api/v1/auth/login" -setx ZENODO_TOKEN = "<... optional ...>" +setx SHIPPER_REPO_TOKENS = "<... optional ...>" docker-compose up ``` The services are available at `http://localhost`. + ### Troubleshooting +- Note that SHIPPER_REPO_TOKENS is a json object of the following form: `{"zenodo": "$ZENODO_TOKEN", "zenodo_sandbox": "$ZENODO_SANDBOX_TOKEN", "download": "" }`. It might have to be escaped when entered via the commandline or PowerShell. - Make sure that the drive where you cloned this repository to is shared (Docker > Shared Drives), because a configuration file (`nginx.conf`) must be mounted into the service `webserver`. - Reconsider using a Linux virtual machine. - Install the latest _edge_ channel of Docker, see https://docs.docker.com/docker-for-windows/faqs/#questions-about-stable-and-edge-channels @@ -41,7 +43,7 @@ When using Compose with Docker Toolbox/Machine on Windows, [volume paths are no Also, the client's defaults (i.e. using `localhost`) does not work. We must mount a config file to point the API to the correct location, see `win/config-toolbox.js`, and use the prepared configuration file `win/docker-compose-toolbox.yml`. ```bash -COMPOSE_CONVERT_WINDOWS_PATHS=1 OAUTH_CLIENT_ID=<...> OAUTH_CLIENT_SECRET=<...> OAUTH_URL_CALLBACK=<...> ZENODO_TOKEN=<...> docker-compose up +COMPOSE_CONVERT_WINDOWS_PATHS=1 OAUTH_CLIENT_ID=<...> OAUTH_CLIENT_SECRET=<...> OAUTH_URL_CALLBACK=<...> SHIPPER_REPO_TOKENS=<...> docker-compose up ``` The services are available at `http://<machine-ip>`. diff --git a/README.md b/README.md index 1c0c29c..9c7eea0 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,8 @@ These repositories also require an authentication token. - [Create access token](https://zenodo.org/login/?next=%2Faccount%2Fsettings%2Fapplications%2Ftokens%2Fnew%2F) for [Zenodo](https://zenodo.org/) +- Note that SHIPPER_REPO_TOKENS is a json object of the following form: `{"zenodo": "$ZENODO_TOKEN", "zenodo_sandbox": "$ZENODO_SANDBOX_TOKEN", "download": "" }`. It might have to be escaped when entered. + #### Elasticsearch host preparation The implementation uses an [Elasticsearch](http://elastic.co) document search engine. @@ -109,7 +111,7 @@ To download all o2r source code at once, navigate to the `reference-implementati Once all repositories have been pulled successfully, build docker images of the microservices and run them in containers by executing: ```bash -O2R_ORCID_ID=<your orcid id> O2R_ORCID_SECRET=<your orcid secret> O2R_ORCID_CALLBACK=http://localhost/api/v1/auth/login O2R_ZENODO_TOKEN=<your token> \ +O2R_ORCID_ID=<your orcid id> O2R_ORCID_SECRET=<your orcid secret> O2R_ORCID_CALLBACK=http://localhost/api/v1/auth/login SHIPPER_REPO_TOKENS={"your_repo": "your_token", ...} \ make build_images run_local ``` @@ -122,7 +124,7 @@ All o2r software projects have automatic builds [available on Docker Hub](https: The following command executes a `docker-compose` command to pull and run these images. ```bash -O2R_ORCID_ID=<your orcid id> O2R_ORCID_SECRET=<your orcid secret> O2R_ORCID_CALLBACK=http://localhost/api/v1/auth/login O2R_ZENODO_TOKEN=<your token> \ +O2R_ORCID_ID=<your orcid id> O2R_ORCID_SECRET=<your orcid secret> O2R_ORCID_CALLBACK=http://localhost/api/v1/auth/login SHIPPER_REPO_TOKENS={"your_repo": "your_token", ...} \ make run_hub ``` diff --git a/docker-compose.yml b/docker-compose.yml index 864e2f4..fd4fa16 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -129,7 +129,7 @@ services: - DEBUG=transporter,transporter:* shipper: - image: o2rproject/o2r-shipper:e3a837c + image: o2rproject/o2r-shipper:f90fb75 restart: unless-stopped depends_on: - configmongodb @@ -137,7 +137,7 @@ services: - o2rvol:/tmp/o2r environment: SHIPPER_MONGODB: "mongodb://mongodb" - SHIPPER_REPO_TOKENS: '{"zenodo_sandbox": "${ZENODO_TOKEN}", "download": "" }' + SHIPPER_REPO_TOKENS: "${SHIPPER_REPO_TOKENS}" SHIPPER_BOTTLE_HOST: "0.0.0.0" SHIPPER_BASE_PATH: "/tmp/o2r" PYTHONUNBUFFERED: "0"