Skip to content

Commit

Permalink
build(affiliation-rnsr): fixed package.json using dvc
Browse files Browse the repository at this point in the history
  • Loading branch information
leogail committed Feb 1, 2024
1 parent 8df9fcc commit d8f92de
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
21 changes: 21 additions & 0 deletions services/affiliation-rnsr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,24 @@
Trouve un RNSR à partir d'une affiliation.

Pour chaque affiliation séparées par un point virgule, retourne un RNSR. Retourne n/a si aucun RNSR n'est trouvé.

## Construction de l'image docker

Nécessite les variables d'environnement:

- `WEBDAV_URL`
- `WEBDAV_LOGIN`
- `WEBDAV_PASSWORD`

> **Note:** pour utiliser un *remote* webdav, le protocole de l'URL est `webdavs`.
> **Note:** n'oubliez pas d'exporter ces variables.
`npm run build:dev` et `npm start:dev` importent le fichier `.env` quand il existe.

> 📗 Suggestion: déclarez les variables dans le fichier `.env` de cette manière:
>
> ```bash
> export WEBDAV_URL=webdavs://your.webdav.com/dvc
> export WEBDAV_LOGIN=yourlogin
> export WEBDAV_PASSWORD=yourpass
> ```
4 changes: 2 additions & 2 deletions services/affiliation-rnsr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"version:push": "git push && git push --tags",
"version": "npm run version:insert && npm run version:commit && npm run version:tag",
"postversion": "npm run version:push",
"build:dev": "docker build -t cnrsinist/${npm_package_name}:latest .",
"build:dev": ". ./.env 2> /dev/null; DOCKER_BUILDKIT=1 docker build -t cnrsinist/${npm_package_name}:latest --secret id=webdav_login,env=WEBDAV_LOGIN --secret id=webdav_password,env=WEBDAV_PASSWORD --secret id=webdav_url,env=WEBDAV_URL .",
"start:dev": "npm run build:dev && docker run --name dev --rm --detach -p 31976:31976 cnrsinist/${npm_package_name}:latest",
"stop:dev": "docker stop dev",
"build": "docker build -t cnrsinist/${npm_package_name}:${npm_package_version} .",
"build": ". ./.env 2> /dev/null; DOCKER_BUILDKIT=1 docker build -t cnrsinist/${npm_package_name}:${npm_package_version} --secret id=webdav_login,env=WEBDAV_LOGIN --secret id=webdav_password,env=WEBDAV_PASSWORD --secret id=webdav_url,env=WEBDAV_URL .",
"start": "docker run --rm -p 31976:31976 cnrsinist/${npm_package_name}:${npm_package_version}",
"publish": "docker push cnrsinist/${npm_package_name}:${npm_package_version}"
}
Expand Down

0 comments on commit d8f92de

Please sign in to comment.