elbosso / WireViz

Easily document cables and wiring harnesses
GNU General Public License v3.0
2 stars 0 forks source link

Internal Server Error #3

Closed quotschmacher closed 4 months ago

quotschmacher commented 4 months ago

I don't know if this project is still maintained... I cloned this repo and made some changes:

diff --git a/Dockerfile b/Dockerfile
index 0733ad9..ffd908c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,9 +21,13 @@ RUN apt-get update && apt-get install -y apache2 \
  && apt-get autoremove \
  && rm -rf /var/lib/apt/lists/*

+RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
+
+RUN service apache2 restart
+
 # Copy over and install the requirements
 COPY ./requirements.txt /var/www/apache-flask/app/requirements.txt
-RUN pip3 install -r /var/www/apache-flask/app/requirements.txt
+RUN pip3 install -r /var/www/apache-flask/app/requirements.txt --break-system-packages

 # Copy over the apache configuration file and enable the site
 COPY ./src/apache-flask.conf /etc/apache2/sites-available/apache-flask.conf
diff --git a/docker-compose.yml b/docker-compose.yml
index 4de4a41..1530f12 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -3,24 +3,24 @@ version: '2'
 services:
   wireviz:
     build: .
-#    ports:
-#      - "8086:80"
+    ports:
+      - "8086:80"
     restart: unless-stopped
-    labels:
-      - "traefik.enable=true"
-      - "traefik.http.routers.wireviz-http.entrypoints=http"
-      - "traefik.http.routers.wireviz-http.rule=Host(`wireviz.docker.lab`)"
+#    labels:
+#      - "traefik.enable=true"
+#      - "traefik.http.routers.wireviz-http.entrypoints=http"
+#      - "traefik.http.routers.wireviz-http.rule=Host(`wireviz.docker.lab`)"
 #      - "traefik.http.routers.wireviz-http.middlewares=wireviz-https"
-      - "traefik.http.services.wireviz-http.loadbalancer.server.port=80"
-      - "traefik.http.middlewares.wireviz-https.redirectscheme.scheme=https"
-      - "traefik.http.routers.wireviz.entrypoints=https"
-      - "traefik.http.routers.wireviz.rule=Host(`wireviz.docker.lab`)"
-      - "traefik.http.routers.wireviz.tls=true"
-      - "traefik.docker.network=traefik_proxy"
-    networks:
-      - traefik_proxy
--    external:
-      name: traefik_proxy
+#networks:
+#  traefik_proxy:
+#    external:
+#      name: traefik_proxy

So in short: deleted all treafik-related stuff, changed the port and added break-system-packages to the pip3 command (I don not have any locally installed Python - all Docker).

After this I got to http://localhost:8086...

If I click "Swagger UI" I get

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

and the docker console output shows

wireviz-wireviz-1  | 172.24.0.1 - - [05/May/2024:20:50:20 +0000] "GET /wsgi/doc/ HTTP/1.1" 500 608
wireviz-wireviz-1  | 172.24.0.1 - - [05/May/2024:20:50:20 +0000] "GET /wsgi/doc/ HTTP/1.1" 500 800 "http://localhost:8086/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 OPR/108.0.0.0"
wireviz-wireviz-1  | 172.24.0.1 - - [05/May/2024:20:50:29 +0000] "-" 408 -
wireviz-wireviz-1  | 172.24.0.1 - - [05/May/2024:20:50:29 +0000] "-" 408 0 "-" "-"

If I use the GUI to upload the demo01.yml and click request png rendering I get the same result - in the browser and in the console output.

Can I support you with some more details?

martinrieder commented 4 months ago

@quotschmacher the WV web service transitioned into this: wireviz/wireviz-web

There is another more recent Dockerfile here: mattytrentini/wireviz-docker

quotschmacher commented 4 months ago

thanks for the feedback