Skip to content

Commit c4ce26d

Browse files
author
7048730
committed
upd docker-compose & readmes
- new shipper build tag and token envs
1 parent 9cbd23a commit c4ce26d

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

README-WIN.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@ The environmental variables must be passed separately on Windows, followed by th
1616
setx OAUTH_CLIENT_ID = "<... required ...>"
1717
setx OAUTH_CLIENT_SECRET = "<... required ...>"
1818
setx OAUTH_URL_CALLBACK = "http://localhost/api/v1/auth/login"
19-
setx ZENODO_TOKEN = "<... optional ...>"
19+
setx SHIPPER_REPO_TOKENS = "<... optional ...>"
2020
docker-compose up
2121
```
2222

2323
The services are available at `http://localhost`.
2424

25+
2526
### Troubleshooting
2627

28+
- 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.
2729
- 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`.
2830
- Reconsider using a Linux virtual machine.
2931
- 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
4143
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`.
4244

4345
```bash
44-
COMPOSE_CONVERT_WINDOWS_PATHS=1 OAUTH_CLIENT_ID=<...> OAUTH_CLIENT_SECRET=<...> OAUTH_URL_CALLBACK=<...> ZENODO_TOKEN=<...> docker-compose up
46+
COMPOSE_CONVERT_WINDOWS_PATHS=1 OAUTH_CLIENT_ID=<...> OAUTH_CLIENT_SECRET=<...> OAUTH_URL_CALLBACK=<...> SHIPPER_REPO_TOKENS=<...> docker-compose up
4547
```
4648

4749
The services are available at `http://<machine-ip>`.

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ These repositories also require an authentication token.
8888

8989
- [Create access token](https://zenodo.org/login/?next=%2Faccount%2Fsettings%2Fapplications%2Ftokens%2Fnew%2F) for [Zenodo](https://zenodo.org/)
9090

91+
- 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.
92+
9193
#### Elasticsearch host preparation
9294

9395
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
109111
Once all repositories have been pulled successfully, build docker images of the microservices and run them in containers by executing:
110112

111113
```bash
112-
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> \
114+
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", ...} \
113115
make build_images run_local
114116
```
115117

@@ -122,7 +124,7 @@ All o2r software projects have automatic builds [available on Docker Hub](https:
122124
The following command executes a `docker-compose` command to pull and run these images.
123125

124126
```bash
125-
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> \
127+
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", ...} \
126128
make run_hub
127129
```
128130

docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@ services:
129129
- DEBUG=transporter,transporter:*
130130

131131
shipper:
132-
image: o2rproject/o2r-shipper:e3a837c
132+
image: o2rproject/o2r-shipper:f90fb75
133133
restart: unless-stopped
134134
depends_on:
135135
- configmongodb
136136
volumes:
137137
- o2rvol:/tmp/o2r
138138
environment:
139139
SHIPPER_MONGODB: "mongodb://mongodb"
140-
SHIPPER_REPO_TOKENS: '{"zenodo_sandbox": "${ZENODO_TOKEN}", "download": "" }'
140+
SHIPPER_REPO_TOKENS: "${SHIPPER_REPO_TOKENS}"
141141
SHIPPER_BOTTLE_HOST: "0.0.0.0"
142142
SHIPPER_BASE_PATH: "/tmp/o2r"
143143
PYTHONUNBUFFERED: "0"

0 commit comments

Comments
 (0)