fixed port

This commit is contained in:
2023-06-11 23:13:17 +02:00
parent 2551250ea0
commit 3a0ce7601c
2 changed files with 4 additions and 11 deletions

View File

@@ -20,11 +20,8 @@ RUN apt-get update && apt-get install -y python3 python3-pip
# Installiere die Python-Abhängigkeiten
RUN pip3 install --no-cache-dir -r requirements.txt
# Setze den Port des Web-Servers
ENV WEB_PORT=80
# Öffne den Port des Web-Servers
EXPOSE $WEB_PORT
EXPOSE 80
# Starte den Web-Server
CMD ["python", "server.js"]

View File

@@ -9,10 +9,6 @@ const command = process.platform === 'win32' ? 'python' : 'python3';
// Pfad zum Kalender-Skript
const scriptPath = path.resolve(__dirname, 'getCalendar.py');
// Definiere den Port, auf dem der Webserver lauschen soll
const webPort = process.env.WEB_PORT || 3000;
const templates = path.join(__dirname, 'templates');
// Stelle den Pfad zum "views" Verzeichnis ein
@@ -80,7 +76,7 @@ app.get('/getreport', (req, res) => {
res.send(getCalendarEntries(req.query.week));
});
// Starte den Server und lass ihn auf Port 3000 lauschen
app.listen(webPort, () => {
console.log('Webserver läuft auf Port', webPort);
// Starte den Webserver
app.listen(80, () => {
console.log('Webserver läuft auf Port 80');
});