Skip to content
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

Disable search API in docker image #473

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
14 changes: 10 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,17 @@ RUN --mount=type=cache,target=/root/.cache \
\
# Create a symlink to the installed python module \
DATAGATEWAY_API_LOCATION="$(python3 -m pip show datagateway_api | awk '/^Location:/ { print $2 }')"; \
ln -s "$DATAGATEWAY_API_LOCATION/datagateway_api/" datagateway_api; \
\
ln -s "$DATAGATEWAY_API_LOCATION/datagateway_api/" datagateway_api;
#\
# Create config.yaml and search_api_mapping.json from their .example files \
cp datagateway_api/config.yaml.example datagateway_api/config.yaml; \
cp datagateway_api/search_api_mapping.json.example datagateway_api/search_api_mapping.json; \
#cp datagateway_api/config.yaml.example datagateway_api/config.yaml; \
#cp datagateway_api/search_api_mapping.json.example datagateway_api/search_api_mapping.json;

# Copy config.yaml that has the search_api section removed
COPY docker/config.yaml datagateway_api/config.yaml

RUN --mount=type=cache,target=/root/.cache \
set -eux; \
\
# Create a non-root user to run as \
addgroup -S datagateway-api; \
Expand Down
20 changes: 20 additions & 0 deletions docker/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
datagateway_api:
extension: "/"
backend: "python_icat"
client_cache_size: 5
client_pool_init_size: 2
client_pool_max_size: 5
db_url: "mysql+pymysql://icatdbuser:icatdbuserpw@localhost:3306/icatdb"
icat_url: "https://localhost:8181"
icat_check_cert: false
flask_reloader: false
log_level: "DEBUG"
log_location: "/home/runner/work/datagateway/datagateway/datagateway-api/datagateway_api/logs.log"
debug_mode: true
generate_swagger: false
host: "127.0.0.1"
port: "5000"
test_user_credentials: { username: "root", password: "pw" }
test_mechanism: "simple"
url_prefix: "/"
Loading