diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2019-01-18 15:49:03 +0100 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2019-01-18 19:33:08 +0100 |
commit | 08ca353205df9612b1e8c0773fce7e85750dfe3b (patch) | |
tree | 0ba5a09820ad5e41ab1ec5dbf7603596c96f01c0 | |
parent | c83cdc933541ed8c9ef882a83affa1264833dd80 (diff) | |
download | wekan-08ca353205df9612b1e8c0773fce7e85750dfe3b.tar.gz wekan-08ca353205df9612b1e8c0773fce7e85750dfe3b.tar.bz2 wekan-08ca353205df9612b1e8c0773fce7e85750dfe3b.zip |
openapi: generate the HTML documentation too and embed it in the image
Aligning with the requirement to run the container without
external resources: embed the documentation of the REST API
directly in the Docker image.
-rw-r--r-- | Dockerfile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -252,6 +252,7 @@ RUN \ gosu wekan:wekan /home/wekan/.meteor/meteor -- help; \ \ # extract the OpenAPI specification + npm install -g api2html && \ mkdir -p /home/wekan/python && \ chown wekan:wekan --recursive /home/wekan/python && \ cd /home/wekan/python && \ @@ -260,7 +261,8 @@ RUN \ python3 setup.py install --record files.txt && \ cd /home/wekan/app &&\ mkdir -p ./public/api && \ - python3 ./openapi/generate_openapi.py --release $(git describe --tags --abbrev=0) > ./public/api/wekan.yml; \ + python3 ./openapi/generate_openapi.py --release $(git describe --tags --abbrev=0) > ./public/api/wekan.yml && \ + /opt/nodejs/bin/api2html -c ./public/wekan-logo-header.png -o ./public/api/wekan.html ./public/api/wekan.yml; \ # Build app cd /home/wekan/app && \ gosu wekan:wekan /home/wekan/.meteor/meteor add standard-minifier-js && \ @@ -285,6 +287,7 @@ RUN \ # Cleanup apt-get remove --purge -y ${BUILD_DEPS} && \ apt-get autoremove -y && \ + npm uninstall -g api2html &&\ rm -R /var/lib/apt/lists/* && \ rm -R /home/wekan/.meteor && \ rm -R /home/wekan/app && \ |