diff --git a/Dockerfile b/Dockerfile index 083bbb0..0733ad9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,6 +36,7 @@ COPY ./src/apache-flask.wsgi /var/www/apache-flask/apache-flask.wsgi COPY ./src/run.py /var/www/apache-flask/run.py COPY ./src/app /var/www/apache-flask/app/ COPY ./src/wireviz /var/www/apache-flask/wireviz/ +COPY ./src/app/static/index.html /var/www/ RUN a2dissite 000-default.conf RUN a2ensite apache-flask.conf diff --git a/src/apache-flask.conf b/src/apache-flask.conf index e28cfe4..a72331c 100644 --- a/src/apache-flask.conf +++ b/src/apache-flask.conf @@ -5,8 +5,19 @@ # Python application integration WSGIDaemonProcess /apache-flask processes=4 threads=20 python-path=/var/www/apache-flask/:/usr/bin/python3 WSGIProcessGroup /apache-flask - WSGIScriptAlias / /var/www/apache-flask/apache-flask.wsgi + WSGIScriptAlias /wsgi /var/www/apache-flask/apache-flask.wsgi + DocumentRoot /var/www + + Options FollowSymLinks + AllowOverride None + + + Options Indexes FollowSymLinks MultiViews + AllowOverride None + Order allow,deny + allow from all + Header set Access-Control-Allow-Origin "*" WSGIProcessGroup /apache-flask @@ -26,7 +37,7 @@ Alias /static /var/www/apache-flask/app/static # ErrorLog ${APACHE_LOG_DIR}/error.log ErrorLog /dev/stderr - LogLevel warn + LogLevel debug # CustomLog ${APACHE_LOG_DIR}/access.log combined TransferLog /dev/stdout CustomLog /dev/stdout combined diff --git a/src/app/static/index.html b/src/app/static/index.html index 3efa2e1..4909443 100644 --- a/src/app/static/index.html +++ b/src/app/static/index.html @@ -33,18 +33,20 @@
curl -X POST "http://<host>:<port>/wireviz/" -H "Content-Type: multipart/form-data" -H "accept: image/svg+xml" -F "yml_file=@<input_file>.yml;type=application/x-yaml" -o <output_file>.svg

If there is no preference specified - the result will be a nice PNG image:

curl -X POST "http://<host>:<port>/wireviz/" -H "Content-Type: multipart/form-data" -F "yml_file=@<input_file>.yml;type=application/x-yaml" -o <output_file>.png
+

If you want, you can also play around with the Swagger UI!

Request PNG...

-
+