forked from openml-labs/server-demo
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Provide a convenience script * Add easy suport for profiles * Remove version since it's deprecated for docker 2+ * Always mount source as read-only * Bake PYTHONPATH into images that need it * Mount code only in dev mode * Provide script for compose down regardless of profile * Use dev compose to mount code directories * Make adding the mount volumes optional through environment variable * Mount script as read-only * Add documentation on the added scripts * Mount the override configuration for the metadata catalogue * Add echo for symmetry with up * Mount the override file instead of the defaults * override should be ignored if it is a directory When the file does not exist on the host machine, docker-compose will create the "file" as a directory when mounting. This is harmless so long as we handle that case correctly. * Add a colored message to remind the user if local changes are mounted * Rename AIOD_MOUNT to USE_LOCAL_DEV to allow broader scope Also require set to "true" rather than any value, to avoid accidental usage. * Move some additional dev settings to the dedicated compose file
- Loading branch information
Showing
9 changed files
with
115 additions
and
29 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
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
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
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,46 @@ | ||
services: | ||
app: | ||
volumes: | ||
- ./src:/app:ro | ||
command: > | ||
python main.py | ||
--build-db if-absent | ||
--reload | ||
fill-db-with-examples: | ||
volumes: | ||
- ./src:/app:ro | ||
- ./connectors:/opt/connectors/script:ro | ||
|
||
deletion: | ||
volumes: | ||
- ./src:/app:ro | ||
|
||
huggingface-dataset-connector: | ||
volumes: | ||
- ./src:/app:ro | ||
- ./connectors/huggingface/:/opt/connectors/script:ro | ||
|
||
keycloak: | ||
command: > | ||
start | ||
--hostname-url http://${HOSTNAME}/aiod-auth | ||
--hostname-admin-url http://${HOSTNAME}/aiod-auth | ||
--http-relative-path=/aiod-auth | ||
--http-enabled=true | ||
--hostname-strict-https=false | ||
--import-realm | ||
openml-connector: | ||
volumes: | ||
- ./src:/app:ro | ||
- ./connectors/openml/:/opt/connectors/script:ro | ||
|
||
zenodo-dataset-connector: | ||
volumes: | ||
- ./src:/app:ro | ||
- ./connectors/zenodo/:/opt/connectors/script:ro | ||
|
||
es_logstash_setup: | ||
volumes: | ||
- ./src:/app:ro |
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
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
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,5 @@ | ||
#!/bin/bash | ||
|
||
command='docker compose --profile "*" down' | ||
echo "${command}" | ||
eval "${command}" |
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,26 @@ | ||
#!/bin/bash | ||
|
||
profiles="" | ||
for arg in "$@"; do | ||
profiles+="--profile $arg " | ||
done | ||
|
||
NC='\033[0m' # No Color | ||
CYAN='\033[1;36m' | ||
GREEN='\033[0;32m' | ||
|
||
source .env | ||
source override.env | ||
|
||
if [[ "${USE_LOCAL_DEV}" == "true" ]]; then | ||
compose_with_dev="-f docker-compose.dev.yaml" | ||
echo -e "Launching ${CYAN}with${NC} local changes." | ||
else | ||
compose_with_dev="" | ||
echo -e "Launching ${GREEN}without${NC} local changes." | ||
fi | ||
|
||
command="docker compose --env-file=.env --env-file=override.env -f docker-compose.yaml ${compose_with_dev} ${profiles} up -d" | ||
echo "${command}" | ||
eval "${command}" | ||
|
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