Compare commits
4 commits
3901db9f76
...
afeb502b8e
| Author | SHA1 | Date | |
|---|---|---|---|
| afeb502b8e | |||
| b72ad44318 | |||
| ebbbe9fe21 | |||
| 4bc661c7c7 |
7 changed files with 17 additions and 27 deletions
|
|
@ -5,7 +5,7 @@ on:
|
|||
branches:
|
||||
- main
|
||||
- master
|
||||
- 'ci/*'
|
||||
- fix_robustness_dockerize_project
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
|
|
|
|||
16
Dockerfile
16
Dockerfile
|
|
@ -1,18 +1,22 @@
|
|||
# Use official lightweight Python base image
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Set working directory inside container
|
||||
WORKDIR /app
|
||||
|
||||
# Prevent Python from writing .pyc files & buffer stdout/stderr
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PORT=8000 \
|
||||
USER_AGENT="Phikipathia/1.0 (https://git.depeuter.dev/tdpeuter/2022ST-project-Phikipathia)"
|
||||
|
||||
# Install Python dependencies first to leverage Docker layer caching
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy application files
|
||||
COPY . .
|
||||
|
||||
# Expose default port
|
||||
EXPOSE 8000
|
||||
|
||||
# Set default environment variables
|
||||
ENV PORT=8000
|
||||
ENV USER_AGENT="Phikipathia/1.0 (Wikipedia Philosophy Path Visualizer; https://github.com/tdpeuter/2022ST-project-Phikipathia)"
|
||||
|
||||
# Run Python HTTP server
|
||||
CMD ["python", "server.py"]
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import requests
|
|||
|
||||
# Default HTTP User-Agent adhering to Wikimedia API policy
|
||||
DEFAULT_USER_AGENT = (
|
||||
"Phikipathia/1.0 (https://git.depeuter.dev/tdpeuter/2022ST-project-Phikipathia; contact@phikipathia.org)"
|
||||
"Phikipathia/1.0 (https://github.com/tdpeuter/2022ST-project-Phikipathia; contact@phikipathia.org)"
|
||||
)
|
||||
|
||||
# Per-request HTTP timeout in seconds
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ services:
|
|||
- "${PORT:-8000}:8000"
|
||||
environment:
|
||||
- PORT=8000
|
||||
- USER_AGENT=${USER_AGENT:-Phikipathia/1.0 (https://git.depeuter.dev/tdpeuter/2022ST-project-Phikipathia)}
|
||||
- USER_AGENT=${USER_AGENT:-Phikipathia/1.0 (https://github.com/tdpeuter/2022ST-project-Phikipathia)}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "python -c 'import urllib.request; urllib.request.urlopen(\"http://localhost:8000/\")'"]
|
||||
interval: 30s
|
||||
|
|
|
|||
11
index.html
11
index.html
|
|
@ -22,12 +22,7 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="taal">Taal: </label>
|
||||
<select id="taal">
|
||||
<option value="en" selected>en (English)</option>
|
||||
<option value="nl">nl (Nederlands)</option>
|
||||
<option value="fr">fr (Français)</option>
|
||||
<option value="de">de (Deutsch)</option>
|
||||
</select>
|
||||
<input type="text" id="taal" placeholder="en" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="start">Startpagina: </label>
|
||||
|
|
@ -84,10 +79,6 @@
|
|||
bij <a href="https://en.wikipedia.org/wiki/Philosophy" target="_blank" rel="noopener">filosofie</a> uitkomt. Lees er
|
||||
<a href="https://en.wikipedia.org/wiki/Wikipedia:Getting_to_Philosophy" target="_blank" rel="noopener">hier</a> meer over.
|
||||
</p>
|
||||
<p class="footer-meta">
|
||||
Code bijgewerkt in 2026. Originele baseline:
|
||||
<a href="https://git.depeuter.dev/tdpeuter/2022ST-project-Phikipathia/src/commit/5ed9fdf2c1eb71068a08256fd4bc46f47b7f1889" target="_blank" rel="noopener">bekijk originele code (commit 5ed9fdf)</a>.
|
||||
</p>
|
||||
<small>© 2022 Tibo De Peuter</small>
|
||||
</footer>
|
||||
|
||||
|
|
|
|||
5
index.js
5
index.js
|
|
@ -357,10 +357,7 @@
|
|||
function init() {
|
||||
if (toevoegKnop) toevoegKnop.addEventListener('click', zoek);
|
||||
if (wisKnop) wisKnop.addEventListener('click', clearTree);
|
||||
if (taal) {
|
||||
taal.addEventListener('input', inputWaarschuwing);
|
||||
taal.addEventListener('change', inputWaarschuwing);
|
||||
}
|
||||
if (taal) taal.addEventListener('input', inputWaarschuwing);
|
||||
if (einde) einde.addEventListener('input', inputWaarschuwing);
|
||||
if (errorDismiss) errorDismiss.addEventListener('click', hideError);
|
||||
|
||||
|
|
|
|||
|
|
@ -101,18 +101,16 @@ main > .box:first-child {
|
|||
gap: 4px;
|
||||
}
|
||||
|
||||
.form-group input[type="text"],
|
||||
.form-group select {
|
||||
.form-group input[type="text"] {
|
||||
padding: 3px 6px;
|
||||
border: 1px solid #a2a9b1;
|
||||
border-radius: 2px;
|
||||
font-size: 0.95em;
|
||||
font-family: sans-serif;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#taal {
|
||||
min-width: 9em;
|
||||
width: 3.5em;
|
||||
}
|
||||
|
||||
#start, #einde {
|
||||
|
|
|
|||
Reference in a new issue