Skip to content
Open
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
8 changes: 7 additions & 1 deletion config/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ server {
proxy_pass $upstream_es/$1$is_args;
}

location ~ ^/py(?:\/(.*))?$ {
include /etc/nginx/shared.conf;
set $upstream_py http://python-api:8000;
proxy_pass $upstream_py/$1$is_args;
}

location ~ ^/api_splits/(.*)$ {
include /etc/nginx/shared.conf;
set $upstream_api http://php-api:80/api_splits;
Expand Down Expand Up @@ -48,4 +54,4 @@ server {
set $upstream_f http://frontend:5000;
proxy_pass $upstream_f/$1$is_args;
}
}
}
21 changes: 21 additions & 0 deletions config/python-server/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
arff_base_url="http://localhost:8000"
minio_base_url="http://localhost:8000/minio"

[fastapi]
root_path=""

[databases.defaults]
host="openml-test-database"
port="3306"
# SQLAlchemy `dialect` and `driver`: https://docs.sqlalchemy.org/en/20/dialects/index.html
drivername="mysql"

[databases.expdb]
database="openml_expdb"

[databases.openml]
database="openml"

[routing]
minio_url="http://localhost:8000/minio/"
server_url="http://localhost:8000/"
25 changes: 25 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,31 @@ services:
timeout: 3s
interval: 1m

# This is the new REST API, which will later replace the PHP REST API
python-api:
profiles: ["all", "rest-api"]
image: openml/rest-api:0.0.1-alpha
container_name: "openml-python-rest-api"
ports:
- "8082:8000" # or localhost:8000/py with nginx
depends_on:
database-setup:
condition: service_completed_successfully
php-api:
condition: service_healthy # used for serving arff files
minio:
condition: service_started # used for serving parquet files
nginx:
condition: service_started # used for routing to MinIO and PHP REST API
volumes:
- ./config/python-server/config.toml:/python-api/src/config.toml
healthcheck:
test: curl 127.0.0.1:8000/datasets/1 | grep -e "anneal"
start_period: 1m
start_interval: 5s
timeout: 3s
interval: 1m

email-server:
profiles: ["all", "frontend"]
image: foxcpp/maddy:latest
Expand Down