Skip to content

Commit 8c6732b

Browse files
committed
docs: add instructions on how to use the docker image
1 parent f2aea17 commit 8c6732b

File tree

1 file changed

+67
-7
lines changed

1 file changed

+67
-7
lines changed

docs/user-guide.md

Lines changed: 67 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,49 @@ This excellent resource covers:
6666

6767
YASGUI is available at: **[https://yasgui.matdata.eu/](https://yasgui.matdata.eu/)**
6868

69+
### Running YASGUI with Docker
70+
71+
You can run YASGUI locally using Docker, which is especially useful when working with local SPARQL endpoints.
72+
73+
**Why Use Docker?**
74+
- Avoids browser mixed content restrictions when querying local endpoints
75+
- No need to grant browser permissions for local network access
76+
- Self-contained environment with all dependencies included
77+
- Easy to set up and run
78+
79+
**Running YASGUI:**
80+
81+
```bash
82+
docker run -p 8080:8080 mathiasvda/yasgui
83+
```
84+
85+
This command:
86+
- Downloads the YASGUI Docker image (first run only)
87+
- Starts YASGUI on port 8080
88+
- Makes it accessible at `http://localhost:8080`
89+
90+
**Accessing YASGUI:**
91+
- Open your browser and navigate to: `http://localhost:8080`
92+
- YASGUI will load and be ready to use
93+
- You can now query local endpoints without browser permission prompts
94+
95+
**Benefits for Local Endpoints:**
96+
- Both YASGUI and your local endpoint use HTTP (no mixed content issues)
97+
- No browser security prompts
98+
- Seamless connection to localhost services
99+
- See [Querying Local Endpoints](#querying-local-endpoints) for more details
100+
101+
**Stopping YASGUI:**
102+
- Press `Ctrl+C` in the terminal where Docker is running
103+
- Or use: `docker stop <container-id>`
104+
105+
**Custom Port:**
106+
To run on a different port (e.g., 3000):
107+
```bash
108+
docker run -p 3000:8080 mathiasvda/yasgui
109+
```
110+
Then access at `http://localhost:3000`
111+
69112
### Your First Query
70113

71114
1. **Select an Endpoint**: Enter a SPARQL endpoint URL in the endpoint field (or use the default)
@@ -136,6 +179,16 @@ The process is similar in Chrome, Firefox, and Safari:
136179
- Safari: Check "Disable local file restrictions" in Develop menu (unverified by author)
137180
- Vivaldi: the same as Edge (verified by author)
138181

182+
**Alternative: Use Docker to Avoid Permission Issues**
183+
184+
If you frequently work with local endpoints, consider running YASGUI locally with Docker:
185+
```bash
186+
docker run -p 8080:8080 mathiasvda/yasgui
187+
```
188+
Then open your browser and navigate to `http://localhost:8080`.
189+
190+
This eliminates browser permission prompts since both YASGUI and your local endpoint use HTTP. See [Running YASGUI with Docker](#running-yasgui-with-docker) for details.
191+
139192
**Important Notes:**
140193
- Permission is required because YASGUI is served over HTTPS while your local endpoint uses HTTP
141194
- This is a browser security feature to protect against mixed content attacks
@@ -959,20 +1012,27 @@ CORS (Cross-Origin Resource Sharing) is a browser security feature. Some SPARQL
9591012
Browsers block HTTP requests to local endpoints from HTTPS pages (mixed content policy). This is a security feature to prevent malicious websites from accessing your local services.
9601013

9611014
**Solutions:**
962-
1. **Grant Browser Permission**:
1015+
1. **Run YASGUI Locally with Docker** (Recommended):
1016+
```bash
1017+
docker run -p 8080:8080 mathiasvda/yasgui
1018+
```
1019+
- Eliminates all permission issues
1020+
- Both YASGUI and local endpoint use HTTP
1021+
- See [Running YASGUI with Docker](#running-yasgui-with-docker) for details
1022+
2. **Grant Browser Permission**:
9631023
- Click "Allow" when the browser prompts for permission
9641024
- See [Querying Local Endpoints](#querying-local-endpoints) for detailed instructions with screenshots
965-
2. **Check Permission Settings**:
1025+
3. **Check Permission Settings**:
9661026
- Click the lock/info icon in the address bar
9671027
- Find "Insecure content" or "Mixed content" setting
9681028
- Change to "Allow" and reload
969-
3. **Verify Local Server is Running**:
1029+
4. **Verify Local Server is Running**:
9701030
- Open `http://localhost:PORT/` in a new tab
9711031
- Ensure you see your SPARQL endpoint's interface
972-
4. **Check Port Number**: Common SPARQL ports are 3030 (Fuseki), 7200 (GraphDB), 3333 (Blazegraph)
973-
5. **Try 127.0.0.1**: If `localhost` doesn't work, try `http://127.0.0.1:PORT/`
974-
6. **Enable CORS on Local Server**: Configure your SPARQL server to allow CORS requests
975-
7. **Use HTTPS for Local Endpoint**: Set up SSL/TLS on your local server (advanced)
1032+
5. **Check Port Number**: Common SPARQL ports are 3030 (Fuseki), 7200 (GraphDB), 3333 (Blazegraph)
1033+
6. **Try 127.0.0.1**: If `localhost` doesn't work, try `http://127.0.0.1:PORT/`
1034+
7. **Enable CORS on Local Server**: Configure your SPARQL server to allow CORS requests
1035+
8. **Use HTTPS for Local Endpoint**: Set up SSL/TLS on your local server (advanced)
9761036

9771037
**Browser-Specific Notes:**
9781038
- **Edge/Chrome/Vivaldi**: Look for shield icon in address bar to manage blocked content

0 commit comments

Comments
 (0)