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

chore!: remove wdqs-proxy #833

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 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
1 change: 0 additions & 1 deletion .github/actions/pull-ghcr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ runs:
"elasticsearch"
"wdqs"
"wdqs-frontend"
"wdqs-proxy"
"quickstatements"
)

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
- elasticsearch
- wdqs
- wdqs-frontend
- wdqs-proxy
- quickstatements

steps:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build_publish_image_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- 'quickstatements@*'
- 'wdqs@*'
- 'wdqs-frontend@*'
- 'wdqs-proxy@*'
- 'wikibase@*'
- 'wikibase-lts@*'

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ on:
- quickstatements
- wdqs
- wdqs-frontend
- wdqs-proxy
- wikibase
- wikibase-lts
- All projects with unreleased changes
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ In order to test your own instances of the services, make sure to change the fol
WIKIBASE_URL=http://wikibase
WIKIBASE_CLIENT_URL=http://wikibase-client
QUICKSTATEMENTS_URL=http://quickstatements
WDQS_FRONTEND_URL=http://wdqs-frontend
WDQS_URL=http://wdqs:9999
WDQS_PROXY_URL=http://wdqs-proxy
WDQS_URL=http://query
MW_ADMIN_NAME=
MW_ADMIN_PASS=
MW_SCRIPT_PATH=/w
Expand Down
21 changes: 10 additions & 11 deletions build/wdqs-frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,13 @@ If QuickStatements and Wikibase are running on the same IP address, a reverse pr

### Environment variables

| Variable | Default | Description |
| --------------- | ---------------------------- | ---------------------------------------- |
| `LANGUAGE` | "en" | Language to use in the UI |
| `BRAND_TITLE` | "DockerWikibaseQueryService" | Name to display on the UI |
| `WIKIBASE_HOST` | "wikibase" | Hostname of the Wikibase host (required) |
| `WDQS_HOST` | "wdqs" | Hostname of the WDQS host |
| `WDQS_PORT` | "9999" | Port of the WDQS host |
| `COPYRIGHT_URL` | "undefined" | URL for the copyright notice |
Variables in **bold** are required.

| Variable | Default | Description |
| ------------------------- | ---------------------------- | -------------------------------|
| `LANGUAGE` | "en" | Language to use in the UI |
| **`WDQS_PUBLIC_URL`** | | Hostname of the WDQS host |
| **`WIKIBASE_PUBLIC_URL`** | | Hostname of the Wikibase host |

## Example

Expand Down Expand Up @@ -125,6 +124,7 @@ services:
hard: 32768
volumes:
- wdqs-data:/wdqs/data
# TODO: make it available
healthcheck:
test: curl --silent --fail localhost:9999/bigdata/namespace/wdq/sparql
interval: 10s
Expand All @@ -144,8 +144,6 @@ services:

wdqs-frontend:
image: wikibase/wdqs-frontend
depends_on:
- wdqs-proxy
restart: unless-stopped
ports:
- 8834:80
Expand All @@ -155,7 +153,8 @@ services:
- "traefik.http.routers.wdqs-frontend.entrypoints=websecure"
- "traefik.http.routers.wdqs-frontend.tls.certresolver=letsencrypt"
environment:
WDQS_HOST: wdqs-proxy
WDQS_PUBLIC_URL: https://query.example/sparql
WIKIBASE_PUBLIC_URL: https://wikibase.example/w/api.php
healthcheck:
test: curl --silent --fail localhost
interval: 10s
Expand Down
4 changes: 2 additions & 2 deletions build/wdqs-frontend/custom-config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"api": {
"sparql": {
"uri": "/proxy/wdqs/bigdata/namespace/wdq/sparql"
"uri": "$WDQS_PUBLIC_URL"
},
"wikibase": {
"uri": "/proxy/wikibase/w/api.php"
"uri": "$WIKIBASE_PUBLIC_URL"
},
"examples": {
"server": "https://www.wikidata.org/",
Expand Down
47 changes: 37 additions & 10 deletions build/wdqs-frontend/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@ server {
listen 80;
server_name localhost;

location /proxy/wikibase {
rewrite /proxy/wikibase/(.*) /${DOLLAR}1 break;
proxy_pass http://$WIKIBASE_HOST:80;
}

location /proxy/wdqs {
rewrite /proxy/wdqs/(.*) /${DOLLAR}1 break;
proxy_pass http://$WDQS_HOST:80;
}

location / {
root /usr/share/nginx/html;
index index.html index.htm;
Expand All @@ -23,3 +13,40 @@ server {
root /usr/share/nginx/html;
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this optional commented-out section of server config? Does it need a comment or clarification here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, no, that is just a left over. Will be removed. Thanks for catching that.




# server {
# listen 80 default_server;
# listen [::]:80 default_server;
#
# location ~ ^/bigdata/(namespace/[a-zA-Z0-9_]+/sparql|ldf|assets) {
# # use IP address for the backend and not "localhost" to ensure
# # connection is done over IPv4 (backend is configured as IPv4 only)
# proxy_pass http://${PROXY_PASS_HOST};
#
# proxy_set_header X-BIGDATA-MAX-QUERY-MILLIS ${PROXY_MAX_QUERY_MILLIS};
# proxy_set_header X-BIGDATA-READ-ONLY "yes";
#
# add_header Access-Control-Allow-Origin * always;
# #add_header Cache-Control "public, max-age=300";
# add_header Vary Accept;
#
# client_max_body_size 1m;
# client_body_buffer_size 1m;
# proxy_intercept_errors off;
# proxy_buffering on;
# proxy_buffer_size 16k;
# proxy_buffers 256 16k;
# proxy_busy_buffers_size 256k;
# proxy_temp_file_write_size 16k;
# proxy_max_temp_file_size 10m;
# proxy_read_timeout 300;
#
# limit_except GET OPTIONS POST {
# deny all;
# }
#
# }
# }
8 changes: 4 additions & 4 deletions build/wdqs-frontend/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

# Test if required environment variables have been set
if [ -z "$WIKIBASE_HOST" ]; then
echo "WIKIBASE_HOST is required but isn't set. You should pass it to docker. See: https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file";
exit 1;
echo "WIKIBASE_HOST is required but isn't set. You should pass it to docker. See: https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file";
exit 1;
fi

if [ -z "$WDQS_HOST" ]; then
echo "WDQS_HOST is required but isn't set. You should pass it to docker. See: https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file";
exit 1;
echo "WDQS_HOST is required but isn't set. You should pass it to docker. See: https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file";
exit 1;
fi

set -eu
Expand Down
5 changes: 0 additions & 5 deletions build/wdqs-proxy/CHANGELOG.md

This file was deleted.

14 changes: 0 additions & 14 deletions build/wdqs-proxy/Dockerfile

This file was deleted.

175 changes: 0 additions & 175 deletions build/wdqs-proxy/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions build/wdqs-proxy/build.env

This file was deleted.

Loading
Loading