Merge pull request #146 from jamebal/drawio
chore: update nginx-drawio Dockerfile
This commit is contained in:
commit
62c670e5ba
@ -1,4 +1,4 @@
|
||||
FROM nginx:latest
|
||||
FROM jmal/nginx-drawio:latest
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
|
||||
@ -2,12 +2,16 @@ FROM nginx:latest
|
||||
|
||||
RUN apt-get update && apt-get install -y unzip wget
|
||||
|
||||
RUN mkdir -p /etc/nginx/servers /var/www
|
||||
|
||||
RUN wget https://github.com/jgraph/drawio/releases/download/v24.4.10/draw.war -O /var/www/draw.war
|
||||
|
||||
RUN unzip /var/www/draw.war -d /var/www/draw
|
||||
|
||||
RUN rm -rf /var/www/draw.war /var/www/draw/META-INF /var/www/draw/WEB-INF
|
||||
|
||||
RUN mkdir -p /etc/nginx/servers
|
||||
RUN apt-get remove -y unzip wget && \
|
||||
apt-get autoremove -y && \
|
||||
apt-get clean
|
||||
|
||||
COPY docker/nginx-drawio/drawio.conf /etc/nginx/servers/drawio.conf
|
||||
|
||||
@ -178,12 +178,12 @@ http {
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
}
|
||||
|
||||
location /draw {
|
||||
proxy_pass http://jmalcloud:8080;
|
||||
location /drawio/webapp/ {
|
||||
proxy_pass http://localhost:8080/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-PORT $remote_port;
|
||||
proxy_set_header X-Forwarded-Host $the_host/draw;
|
||||
proxy_set_header X-Forwarded-Host $the_host//drawio/webapp;
|
||||
proxy_set_header X-Forwarded-Proto $the_scheme;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
|
||||
@ -85,7 +85,7 @@ export default {
|
||||
let theme = 'kennedy'
|
||||
let title = this.file.name ? encodeURIComponent(this.file.name) : ''
|
||||
let query = `?title=${title}&chrome=${chrome}&lightbox=${lightbox}&ui=${theme}&lang=${language}&offline=0&pwa=0&embed=1&noLangIcon=1&noExitBtn=1&noSaveBtn=1&saveAndExit=0&spin=1&proto=json`
|
||||
this.url = $J.apiUrl(`../draw/?${query}`)
|
||||
this.url = $J.apiUrl(`../drawio/webapp/${query}`)
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('message', this.handleMessage)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user