generated from NASA-PDS/template-repo-java
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial addition of the configuration files for Dockerization of the …
…PDS DOI Service
- Loading branch information
Scott Collins
committed
Apr 13, 2021
1 parent
870c83e
commit 502692f
Showing
4 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
pds_doi_service.ini | ||
doi.db | ||
doi_temp.db | ||
transaction_history/ | ||
**/test* | ||
**/.DS_Store | ||
**/__pycache__ | ||
**/.pytest_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM python:3.7-slim | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
COPY requirements.txt /usr/src/app/ | ||
|
||
RUN pip3 install --no-cache-dir -r requirements.txt | ||
|
||
COPY ./pds_doi_service /usr/src/app/pds_doi_service | ||
|
||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["python3"] | ||
|
||
CMD ["-m", "pds_doi_service.api"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: "3.7" | ||
|
||
services: | ||
pds-doi-api: | ||
image: pds-doi-service:latest | ||
ports: | ||
- 8080:8080 | ||
working_dir: /usr/src/app | ||
volumes: | ||
- sqllite-data:/usr/src/data | ||
environment: | ||
# By setting this envvar in the Compose file, it supersedes anything set | ||
# in doi_service.env. This is how we ensure the SQLite file is written to | ||
# the sqllite-data persistent volume. | ||
- OTHER_DB_FILE=/usr/src/data/doi.db | ||
env_file: | ||
- doi_service.env | ||
|
||
volumes: | ||
sqllite-data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# This file is used with docker-compose.yml to specify a number of environment | ||
# variable key/value pairs to add to the DOI Service's environment when | ||
# launching the container via docker compose up. | ||
|
||
# The DOI Service prioritizes environment variables over the included INI, | ||
# so this file may be used to inject credentials or any other supported | ||
# options into the DOI Service when in a containerized context. | ||
|
||
# The naming convention for expected environment variables follows from the | ||
# format of the INI, where the section name and option name are concatenated | ||
# with an underscore and converted to uppercase, for example: | ||
|
||
# OSTI_USER=username -> overrides the "user" option of the [OSTI] INI section. | ||
|
||
# If the default values from the bundled INI are desired, do not specify | ||
# environment variables for them here or they will be overridden. | ||
|
||
# Also note that Docker performs "no special handling of quotation marks" for | ||
# values. This means that they become part of the value provided to the DOI Service. | ||
|
||
# [OSTI] | ||
OSTI_URL=https://www.osti.gov/iad2test/api/records | ||
OSTI_USER=username | ||
OSTI_PASSWORD=secret | ||
|
||
# [PDS4_DICTIONARY] | ||
PDS4_DICTIONARY_URL=https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_JSON_1D00.JSON | ||
|
||
# [LANDING_PAGES] | ||
LANDING_PAGES_URL=https://pds.nasa.gov/ds-view/pds/view{}.jsp?identifier={}&version={} | ||
|
||
# [OTHER] | ||
OTHER_EMAILER_SENDER=[email protected] | ||
OTHER_PDS_REGISTRATION_DOI_TOKEN=10.17189 | ||
OTHER_LOGGING_LEVEL=DEBUG |