Skip to content

upd docker-compose & readmes #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README-WIN.md
Original file line number Diff line number Diff line change
@@ -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>`.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
```

4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -129,15 +129,15 @@ services:
- DEBUG=transporter,transporter:*

shipper:
image: o2rproject/o2r-shipper:e3a837c
image: o2rproject/o2r-shipper:f90fb75
restart: unless-stopped
depends_on:
- configmongodb
volumes:
- 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"