From 3a56c91aefdfeeecf388375dfebc24186c1b30ee Mon Sep 17 00:00:00 2001 From: Torben Brenner Date: Fri, 29 Jan 2021 03:17:47 +0100 Subject: [PATCH 1/7] build: Updated Dockerfile for easier docker usage --- Dockerfile | 7 +++++++ src/main/resources/paths.docker.xml | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d95c21e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +ARG DOCKER_COMMON_VERSION=0.2.0 +FROM torbenbrenner/tomcat.common:${DOCKER_COMMON_VERSION} +MAINTAINER t.brenner@dkfz-heidelberg.de +LABEL magicpl.version="latest" +### Environment variables for docker.common. +ENV COMPONENT="magicpl" MANDATORY_VARIABLES="MAGICPL_API_KEY MAGICPL_PASSPHRASE" +ENV MAGICPL_LOG_LEVEL="info" diff --git a/src/main/resources/paths.docker.xml b/src/main/resources/paths.docker.xml index 6e68e82..514060f 100644 --- a/src/main/resources/paths.docker.xml +++ b/src/main/resources/paths.docker.xml @@ -1,16 +1,16 @@ - + + ]> + xsi:schemaLocation="http://www.example.org/Pfade magicpl.xsd "> - getId + getKN @@ -56,7 +56,7 @@ - getId + getKN &pathsApiKey; From 4a41633240b4f6fa8550bcb2f70b87ebf3bd4d6c Mon Sep 17 00:00:00 2001 From: Torben Brenner Date: Fri, 29 Jan 2021 03:18:34 +0100 Subject: [PATCH 2/7] docs: Added Apache License 2.0 file to repository --- LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8d89157 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 The Samply Development Community + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file From be07689ed92d0e4e06e28cda112fa4e58b76810b Mon Sep 17 00:00:00 2001 From: Torben Brenner Date: Fri, 29 Jan 2021 03:19:27 +0100 Subject: [PATCH 3/7] docs: Added template for a contribution guide --- docs/contributing.md | 92 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 docs/contributing.md diff --git a/docs/contributing.md b/docs/contributing.md new file mode 100644 index 0000000..49036d5 --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1,92 @@ +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the README.md with details of changes to the interface, this includes new environment + variables, exposed ports, useful file locations and container parameters. +3. Increase the version numbers in any examples files and the README.md to the new version that this + Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you + do not have permission to do that, you may request the second reviewer to merge it for you. + +## Code of Conduct + +### Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +### Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +### Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +### Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +### Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at [TODO]. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +### Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ \ No newline at end of file From 3ef80c290544173d079e1b0e6e2f06ca237404e4 Mon Sep 17 00:00:00 2001 From: Torben Brenner Date: Fri, 29 Jan 2021 03:30:48 +0100 Subject: [PATCH 4/7] docs: Updated readme file --- readme.md | 139 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 79 insertions(+), 60 deletions(-) diff --git a/readme.md b/readme.md index 5d12b58..8a1415f 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,10 @@ -# mainzelliste.paths +# MagicPL (paths) -The component mainzelliste.paths is intended for the description of different pseudonymization processes. It should also offer a replacement for the idmanager component known from DKTK. +The component MagicPL is intended for building pseudonymisation processes. +It implements multiple Processors which enable users to describe their pseudonymisation process. + +> Note: Due to the naming during development (paths) some files are still not named correctly for MagicPL. +> In future releases we will rename those files to fit the official name MagicPL. ## Getting Started @@ -9,81 +13,65 @@ These instructions will get you a copy of the project up and running on your loc ### Prerequisites - Java -- JDK 8 +- [OpenJDK 8](https://openjdk.java.net/projects/jdk8/) - the build tool [maven](https://maven.apache.org/) +- [Git](https://git-scm.com/), which is currently needed for completing a build with maven. - [Tomcat Server](https://tomcat.apache.org/) (version 8 is recommended) > Alternatively you can use docker for building and deploying the container. All steps will be described with and without docker -### Installing - -**Building the WAR file**: +### Installing without docker +First you need to build a WAR file from your copy of the source code. You can do this by using the build tool maven: ```shell script mvn clean install ``` -**or with docker**: +The command will build the WAR file for you and put it in the "./target/" directory of your local copy. +You can now deploy the generated WAR file by putting it in the "webapps" directory of your local tomcat instance. For more information on how to deploy a WAR into Tomcat, you can refer to this [link](https://tomcat.apache.org/tomcat-8.0-doc/deployer-howto.html). -First you will need to build the builder container: -```shell script -curl https://bitbucket.org/brennert/docker.common/raw/11df911fc47f212d89d6bf4ff92434cf3380fdbc/maven-git/Dockerfile | docker build -t samply-builder - -``` +### Installing with docker +> NOTE: In this section images from torbenbrenner on dockerhub are used. We will transfer these images in the near future to medicalinformatics. -After building the builder container you can run this to build the WAR File. -> Note: -> With this environment variables the container will use the current code and your local maven registry and maven settings to build. +To build MagicPL we need to use a little alternated version of the official [maven image](https://hub.docker.com/_/maven). This version installs git additionally, because otherwise the build would not complete. ```shell script -docker run -it --rm --name paths-build -v /$(pwd)/://usr/src/paths-build/ -w //usr/src/paths-build/ -v /$HOME/.m2/://root/.m2 samply-builder mvn clean install; +docker run -it --rm --name magicpl-build -v /$(pwd)/://usr/src/magicpl-build/ -w //usr/src/magicpl-build/ -v magicpl-build-cache://root/.m2 torbenbrenner/maven-git:0.2.0 mvn clean install; ``` +This command is nearly equivalent to running the maven build locally. Only the local cache of maven is not stored inside your home directory, but inside a docker volume (magicpl-build-cache). -With the WAR File build, it now should be possible to build a new tomcat container with following command: +Now with the exploded WAR beeing located in "./target/paths/", we can build the docker image with following command: ```shell script -curl https://bitbucket.org/brennert/docker.common/raw/11099d68f243095e7e620070bb2fe520553a18e9/tomcat/Dockerfile | docker build -t paths:latest --build-arg COMPONENT=paths --build-arg COMMON_REPOSITORY_URN=https://bitbucket.org/brennert/docker.common/raw/11099d68f243095e7e620070bb2fe520553a18e9 -f - ./target +docker build -t magicpl:test -f ../../Dockerfile ./target/paths/ ``` To run the docker container you can now use: ```shell script -docker run -p 8080:8080 --rm -it paths:latest +docker run -p 8080:8080 --rm -it magicpl:test ``` +The image will also be available at [medicalinformatics/magicpl](https://hub.docker.com/repository/docker/medicalinformatics/magicpl) in Docker Hub. ## Running the tests - -> Note: Currently no tests exist - -TODO: Explain how to run the automated tests for this system. - -### Break down into end to end tests - -TODO: Explain what these tests test and why - -``` -Give an example +The [basic configuration](./src/main/resources/paths.docker.xml), which is also by default used in the docker image, enables a single path for generating controllnumbers from a configured passphrase. +You can test your installation by running following curl command: +```shell +curl --header "Content-Type: application/json" \ + --request POST \ + --data '{"vorname":"Max","nachname":"Mustermann", "geburtsname": "", "geburtstag": 01, "geburtsmonat": 01, "geburtsjahr": 2000, "geburtsort": "Musterstadt"}' \ + http://localhost:8080/paths/getKN ``` -### And coding style tests +## Usage -TODO: Explain what these tests test and why +The image for MagicPL is available on docker hub at [medicalinformatics/magicpl](https://hub.docker.com/repository/docker/medicalinformatics/magicpl) -``` -Give an example -``` - -## Deployment - -> Note: Currently there is now downloadable version of the docker container, so you will need to build it yourself using the steps described above. - -The image for -> Please note that currently only a standardized version of paths is available via docker image. The passing of configuration is still in testing. - -The component image currently supports following environment variables: +The basic component image currently supports following environment variables: |variable name|description|default value| |-------------|-----------|-------------| -|PATHS_API_KEY|the api key used to access paths interface|PATHS_API_KEY| -|PATHS_PASSPHRASE|the passphrase used to generate controllnumbers|PATHS_PASSPHRASE| +|MAGICPL_API_KEY|the api key used to access paths interface|PATHS_API_KEY| +|MAGICPL_PASSPHRASE|the passphrase used to generate controllnumbers|PATHS_PASSPHRASE| |PATHS_ALLOWED_ORIGINS|sets the [**Access-Control-Allow-Origin**](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin) Header of the Responses|-| |PATHS_ALLOWED_CORS_HEADERS|sets the [**Access-Control-Allow-Headers**](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers) Header of the Response. Needs PATHS_ALLOWED_ORIGINS to be defined.|-| -For tomcat the following environment variables are supported by the image: +Additionally, some environment variables are available for configuring tomcat: |variable name|description|default value| |-------------|-----------|-------------| @@ -92,40 +80,71 @@ For tomcat the following environment variables are supported by the image: |TOMCAT_REVERSEPROXY_PORT|The corresponding port number|80 or 443 according to TOMCAT_REVERSEPROXY_SSL| |TOMCAT_REVERSEPROXY_SSL|Set to true if container is accessed via SSL/TLS; false otherwise|false| -TODO: move this to docker.common readme.md +You can pass your own configuration to the MagicPL image, by configuring a secret named "paths.docker.xml". This secret should refer to a local file +in the configuration format for magicpl. Some examples are available in [resources directory](./src/main/resources). + +Here is an example in the docker-compose yaml format: +```yaml +version: "3.7" +services: + magicpl: + image: medicalinformatics/magicpl:0.0.1 + environment: + MAGICPL_API_KEY: pleaseChangeMe + MAGICPL_PASSPHRASE: pleaseChangeMe + ports: + - 8080:8080 + secrets: + - paths.docker.xml +secrets: + paths.docker.xml: + file: ./src/main/resources/pathsDKTK.xml +``` + +It is possible to define your own environment variables in your custom configuration, by writting the environment variable name in your configuration. +All custom environment variables must be prefixed with "MAGICPL_". You can review the default [docker configuration](./src/main/resources/paths.docker.xml) for an example. + +For further information on how to configure MagicPL, please refer to the [Documentation](./docs/magicpl-documentation-0.1.0.pdf). + +## Roadmap + +Also refer to [open issues](https://github.com/medicalinformatics/magicpl/issues) for a list of proposed features (and known issues). ## Built With -TODO: +* [Java](https://www.java.com/de/) - The programming language used * [Maven](https://maven.apache.org/) - Dependency Management +* [Docker](https://www.docker.com/) - Tool for building and running containers +* [Docker Hub](https://hub.docker.com/) - Used for automatic builds and delivery of images ## Contributing -TODO: -Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us. +Please read [Contributing](./docs/contributing.md) for details on our code of conduct, and the process for submitting pull requests to us. ## Versioning -We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags). +We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/medicalinformatics/magicpl/tags). ## Authors * **Andreas Borg** - *Initial work* -* **Galina Tremper** - *Initial work* * **Christian Koch** - *Initial work* +* **Galina Tremper** - *Initial work*,*Team Member* -* **Torben Brenner** - *Further development* -* **Moanes Ben Amor** - *Further development* +* **Torben Brenner** - *Team Member* +* **Moanes Ben Amor** - *Team Member* -See also the list of [contributors](TODO) who participated in this project. +See also the list of [contributors](https://github.com/medicalinformatics/magicpl/contributors) who participated in this project. ## License -TODO: +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ## Acknowledgments -TODO: -* Hat tip to anyone whose code was used -* Inspiration -* etc +* [Mainzelliste.Client](https://bitbucket.org/medicalinformatics/mainzelliste.client/src/master/) +* [Log4j](https://logging.apache.org/log4j/2.x/) From ec0edb5f455105313f76e37adda2e4559bbbbd60 Mon Sep 17 00:00:00 2001 From: Torben Brenner Date: Fri, 29 Jan 2021 09:10:23 +0100 Subject: [PATCH 5/7] docs: Moved pdf documentation to releases page --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 8a1415f..6010d22 100644 --- a/readme.md +++ b/readme.md @@ -104,7 +104,7 @@ secrets: It is possible to define your own environment variables in your custom configuration, by writting the environment variable name in your configuration. All custom environment variables must be prefixed with "MAGICPL_". You can review the default [docker configuration](./src/main/resources/paths.docker.xml) for an example. -For further information on how to configure MagicPL, please refer to the [Documentation](./docs/magicpl-documentation-0.1.0.pdf). +For further information on how to configure MagicPL, please refer to the Documentation. For each release in the [releases page](https://github.com/medicalinformatics/magicpl/releases) ## Roadmap From 7ac66d9132d5074228d898f7a67793adcd6007cc Mon Sep 17 00:00:00 2001 From: Torben Brenner Date: Fri, 29 Jan 2021 09:13:50 +0100 Subject: [PATCH 6/7] docs: moved build with section downwards --- readme.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index 6010d22..ae9d0d6 100644 --- a/readme.md +++ b/readme.md @@ -110,13 +110,6 @@ For further information on how to configure MagicPL, please refer to the Documen Also refer to [open issues](https://github.com/medicalinformatics/magicpl/issues) for a list of proposed features (and known issues). -## Built With - -* [Java](https://www.java.com/de/) - The programming language used -* [Maven](https://maven.apache.org/) - Dependency Management -* [Docker](https://www.docker.com/) - Tool for building and running containers -* [Docker Hub](https://hub.docker.com/) - Used for automatic builds and delivery of images - ## Contributing Please read [Contributing](./docs/contributing.md) for details on our code of conduct, and the process for submitting pull requests to us. @@ -144,6 +137,13 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +## Built With + +* [Java](https://www.java.com/de/) - The programming language used +* [Maven](https://maven.apache.org/) - Dependency Management +* [Docker](https://www.docker.com/) - Tool for building and running containers +* [Docker Hub](https://hub.docker.com/) - Used for automatic builds and delivery of images + ## Acknowledgments * [Mainzelliste.Client](https://bitbucket.org/medicalinformatics/mainzelliste.client/src/master/) From 03c48568e4f53b7cc0b5de6ee5f91c003ef68eed Mon Sep 17 00:00:00 2001 From: Torben Brenner Date: Fri, 29 Jan 2021 09:28:19 +0100 Subject: [PATCH 7/7] docs: corrected docker commands --- readme.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index ae9d0d6..6b03831 100644 --- a/readme.md +++ b/readme.md @@ -39,12 +39,12 @@ This command is nearly equivalent to running the maven build locally. Only the l Now with the exploded WAR beeing located in "./target/paths/", we can build the docker image with following command: ```shell script -docker build -t magicpl:test -f ../../Dockerfile ./target/paths/ +docker build -t magicpl:test -f ./Dockerfile ./target/paths/ ``` To run the docker container you can now use: ```shell script -docker run -p 8080:8080 --rm -it magicpl:test +docker run -p 8080:8080 --rm -it -e MAGICPL_API_KEY=pleaseChangeMe -e MAGICPL_PASSPHRASE=youShouldReallyChangeMe magicpl:test ``` The image will also be available at [medicalinformatics/magicpl](https://hub.docker.com/repository/docker/medicalinformatics/magicpl) in Docker Hub. @@ -53,7 +53,8 @@ The [basic configuration](./src/main/resources/paths.docker.xml), which is also You can test your installation by running following curl command: ```shell curl --header "Content-Type: application/json" \ - --request POST \ + --header "apiKey: pleaseChangeMe" \ + -X POST \ --data '{"vorname":"Max","nachname":"Mustermann", "geburtsname": "", "geburtstag": 01, "geburtsmonat": 01, "geburtsjahr": 2000, "geburtsort": "Musterstadt"}' \ http://localhost:8080/paths/getKN ```