APmanageur Wi-Fi V1.0 : conteneur Debian + Apache

This commit is contained in:
yoann committed 2026-10-05 01:18:55 +02:00
1 parent c705504e5d
commit 2d3f8d8b3c
5 files changed
+66 -47

No files matched your search

+5 -2
View File
@@ -20,16 +20,19 @@ COPY ap.py /app/ap.py
ARG HTML_FILE=index.html
COPY ${HTML_FILE} /app/index.html
COPY ${HTML_FILE} /var/www/html/index.html
# L'API n'est plus joignable que via Apache : le HTML appelle /api sur le même port (1001)
RUN sed -i 's#const API_URL=[^;]*;#const API_URL="";#' /app/index.html /var/www/html/index.html
COPY apache-ap.conf /etc/apache2/sites-available/000-default.conf
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh && rm -f /var/www/html/index.html.orig \
&& sed -i 's/^Listen 80$/Listen 1001/; s/^\s*Listen 443$/ Listen 1443/' /etc/apache2/ports.conf
&& sed -i 's/^Listen 80$/Listen ${AP_WEB_PORT}/; s/^\s*Listen 443$/ Listen 1443/' /etc/apache2/ports.conf
ENV AP_DB_FILE=/data/ap-dashboard.sqlite3 \
AP_CONNECTION_FILE=/data/connection \
AP_UPTIME_FILE=/data/uptime
VOLUME ["/data", "/etc/NetworkManager/system-connections", "/var/lib/NetworkManager"]
EXPOSE 1001 8080
ENV AP_WEB_PORT=1001
EXPOSE 1001
ENTRYPOINT ["/entrypoint.sh"]