diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2018-11-07 18:49:21 +0100 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2019-01-18 17:03:05 +0100 |
commit | acc44935179cda665454d450ec246377f41f5afb (patch) | |
tree | 35789344142b5c89814e74d9fe65d59abe81ee08 /Dockerfile | |
parent | ff467402c0c24981078f1f8e2b92b26b0d67d00a (diff) | |
download | wekan-acc44935179cda665454d450ec246377f41f5afb.tar.gz wekan-acc44935179cda665454d450ec246377f41f5afb.tar.bz2 wekan-acc44935179cda665454d450ec246377f41f5afb.zip |
Generate the OpenAPI in the Dockerfile
When we build the docker container, we need to generate the openapi
description in it so the geenrated API actually matches the code
the container is running.
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -75,7 +75,7 @@ ARG DEFAULT_AUTHENTICATION_METHOD # Set the environment variables (defaults where required) # DOES NOT WORK: paxctl fix for alpine linux: https://github.com/wekan/wekan/issues/1303 # ENV BUILD_DEPS="paxctl" -ENV BUILD_DEPS="apt-utils bsdtar gnupg gosu wget curl bzip2 build-essential python git ca-certificates gcc-7" \ +ENV BUILD_DEPS="apt-utils bsdtar gnupg gosu wget curl bzip2 build-essential python python3 python3-distutils git ca-certificates gcc-7" \ NODE_VERSION=v8.15.0 \ METEOR_RELEASE=1.6.0.1 \ USE_EDGE=false \ @@ -251,6 +251,16 @@ RUN \ cd /home/wekan/.meteor && \ gosu wekan:wekan /home/wekan/.meteor/meteor -- help; \ \ + # extract the OpenAPI specification + mkdir -p /home/wekan/python && \ + chown wekan:wekan --recursive /home/wekan/python && \ + cd /home/wekan/python && \ + gosu wekan:wekan git clone --depth 1 -b master git://github.com/Kronuz/esprima-python && \ + cd /home/wekan/python/esprima-python && \ + 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; \ # Build app cd /home/wekan/app && \ gosu wekan:wekan /home/wekan/.meteor/meteor add standard-minifier-js && \ @@ -279,6 +289,8 @@ RUN \ rm -R /home/wekan/.meteor && \ rm -R /home/wekan/app && \ rm -R /home/wekan/app_build && \ + cat /home/wekan/python/esprima-python/files.txt | xargs rm -R && \ + rm -R /home/wekan/python && \ rm /home/wekan/install_meteor.sh ENV PORT=8080 |