Co-authored-by: Tim Lai <timothy.lai@gmail.com>
This commit is contained in:
@@ -18,15 +18,12 @@ COPY ./docker/nginx.conf ./docker/cors.conf /etc/nginx/
|
|||||||
|
|
||||||
# copy swagger files to the `/js` folder
|
# copy swagger files to the `/js` folder
|
||||||
COPY ./dist/* /usr/share/nginx/html/
|
COPY ./dist/* /usr/share/nginx/html/
|
||||||
COPY ./docker/run.sh /usr/share/nginx/
|
COPY ./docker/docker-entrypoint.d/ /docker-entrypoint.d/
|
||||||
COPY ./docker/configurator /usr/share/nginx/configurator
|
COPY ./docker/configurator /usr/share/nginx/configurator
|
||||||
|
|
||||||
RUN chmod +x /usr/share/nginx/run.sh && \
|
RUN chmod -R a+rw /usr/share/nginx && \
|
||||||
chmod -R a+rw /usr/share/nginx && \
|
|
||||||
chmod -R a+rw /etc/nginx && \
|
chmod -R a+rw /etc/nginx && \
|
||||||
chmod -R a+rw /var && \
|
chmod -R a+rw /var && \
|
||||||
chmod -R a+rw /var/run
|
chmod -R a+rw /var/run
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
CMD ["sh", "/usr/share/nginx/run.sh"]
|
|
||||||
|
|||||||
2
docker/run.sh → docker/docker-entrypoint.d/40-swagger-ui.sh
Normal file → Executable file
2
docker/run.sh → docker/docker-entrypoint.d/40-swagger-ui.sh
Normal file → Executable file
@@ -62,5 +62,3 @@ if [[ -n "${PORT}" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
find $NGINX_ROOT -type f -regex ".*\.\(html\|js\|css\)" -exec sh -c "gzip < {} > {}.gz" \;
|
find $NGINX_ROOT -type f -regex ".*\.\(html\|js\|css\)" -exec sh -c "gzip < {} > {}.gz" \;
|
||||||
|
|
||||||
exec nginx -g 'daemon off;'
|
|
||||||
Reference in New Issue
Block a user