parent
d717786aee
commit
42dc0a483d
5 changed files with 42 additions and 124 deletions
@ -1,20 +1,19 @@ |
|||||||
FROM vectorim/element-web:v1.9.0 as builder |
FROM alpine as builder |
||||||
|
|
||||||
FROM alpine:latest |
ARG VERSION=v1.11.12 |
||||||
|
|
||||||
LABEL maintainer "me@jerryaldrichiii.com" |
RUN apk add --no-cache wget |
||||||
|
|
||||||
RUN apk add --no-cache lighttpd=1.4.54-r0 |
WORKDIR /src |
||||||
|
|
||||||
RUN chown -R lighttpd /var/log/lighttpd |
RUN wget -O /src/element.tar.gz \ |
||||||
|
https://github.com/vector-im/element-web/releases/download/$VERSION/element-$VERSION.tar.gz |
||||||
|
|
||||||
USER lighttpd |
RUN tar xvzf element.tar.gz |
||||||
|
|
||||||
COPY lighttpd.conf /etc/lighttpd/lighttpd.conf |
RUN mv element-v* element |
||||||
COPY mime-types.conf /etc/lighttpd/mime-types.conf |
|
||||||
|
|
||||||
COPY --from=builder /app /srv/http/ |
FROM jerryaldrichiii/nginx-unprivileged:1.23.2 |
||||||
|
|
||||||
EXPOSE 8080 |
COPY ./config.json /usr/share/nginx/html/config.json |
||||||
|
COPY --from=builder /src/element/ /usr/share/nginx/html/ |
||||||
CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"] |
|
||||||
|
@ -0,0 +1,16 @@ |
|||||||
|
# Element Web |
||||||
|
|
||||||
|
How to run: |
||||||
|
|
||||||
|
``` |
||||||
|
docker run \ |
||||||
|
-it \ |
||||||
|
-p 8080:8080 \ |
||||||
|
jerryaldrichiii/element-web:latest |
||||||
|
``` |
||||||
|
|
||||||
|
Add the following to mount your own config: |
||||||
|
|
||||||
|
``` |
||||||
|
-v /path/to/your/config.json:/usr/share/nginx/html/config.json |
||||||
|
``` |
@ -1,31 +0,0 @@ |
|||||||
var.logdir = "/var/log/lighttpd" |
|
||||||
var.statedir = "/var/lib/lighttpd" |
|
||||||
|
|
||||||
server.modules = ( |
|
||||||
"mod_access", |
|
||||||
"mod_accesslog", |
|
||||||
"mod_setenv", |
|
||||||
) |
|
||||||
|
|
||||||
include "mime-types.conf" |
|
||||||
|
|
||||||
server.document-root = "/srv/http/" |
|
||||||
server.pid-file = "/tmp/lighttpd.pid" |
|
||||||
|
|
||||||
server.errorlog-use-syslog = "enable" |
|
||||||
accesslog.use-syslog = "enable" |
|
||||||
|
|
||||||
server.indexfiles = ("index.html") |
|
||||||
|
|
||||||
server.port = 8080 |
|
||||||
|
|
||||||
setenv.add-response-header = ( |
|
||||||
"X-Frame-Options" => "SAMEORIGIN", |
|
||||||
"X-Content-Type-Options" => "nosniff", |
|
||||||
"X-XSS-Protection" => "1; mode=block", |
|
||||||
"Content-Security-Policy" => "frame-ancestors 'none'", |
|
||||||
) |
|
||||||
|
|
||||||
url.access-deny = ("~", ".inc") |
|
||||||
|
|
||||||
server.network-backend = "writev" |
|
@ -1,71 +0,0 @@ |
|||||||
mimetype.assign = ( |
|
||||||
".svg" => "image/svg+xml", |
|
||||||
".svgz" => "image/svg+xml", |
|
||||||
".pdf" => "application/pdf", |
|
||||||
".sig" => "application/pgp-signature", |
|
||||||
".spl" => "application/futuresplash", |
|
||||||
".class" => "application/octet-stream", |
|
||||||
".ps" => "application/postscript", |
|
||||||
".torrent" => "application/x-bittorrent", |
|
||||||
".dvi" => "application/x-dvi", |
|
||||||
".gz" => "application/x-gzip", |
|
||||||
".pac" => "application/x-ns-proxy-autoconfig", |
|
||||||
".swf" => "application/x-shockwave-flash", |
|
||||||
".tar.gz" => "application/x-tgz", |
|
||||||
".tgz" => "application/x-tgz", |
|
||||||
".tar" => "application/x-tar", |
|
||||||
".zip" => "application/zip", |
|
||||||
".dmg" => "application/x-apple-diskimage", |
|
||||||
".mp3" => "audio/mpeg", |
|
||||||
".m3u" => "audio/x-mpegurl", |
|
||||||
".wma" => "audio/x-ms-wma", |
|
||||||
".wax" => "audio/x-ms-wax", |
|
||||||
".ogg" => "application/ogg", |
|
||||||
".wav" => "audio/x-wav", |
|
||||||
".gif" => "image/gif", |
|
||||||
".jpg" => "image/jpeg", |
|
||||||
".jpeg" => "image/jpeg", |
|
||||||
".png" => "image/png", |
|
||||||
".xbm" => "image/x-xbitmap", |
|
||||||
".xpm" => "image/x-xpixmap", |
|
||||||
".xwd" => "image/x-xwindowdump", |
|
||||||
".css" => "text/css", |
|
||||||
".html" => "text/html", |
|
||||||
".htm" => "text/html", |
|
||||||
".js" => "text/javascript", |
|
||||||
".asc" => "text/plain", |
|
||||||
".c" => "text/plain", |
|
||||||
".h" => "text/plain", |
|
||||||
".cc" => "text/plain", |
|
||||||
".cpp" => "text/plain", |
|
||||||
".hh" => "text/plain", |
|
||||||
".hpp" => "text/plain", |
|
||||||
".conf" => "text/plain", |
|
||||||
".log" => "text/plain", |
|
||||||
".text" => "text/plain", |
|
||||||
".txt" => "text/plain", |
|
||||||
".diff" => "text/plain", |
|
||||||
".patch" => "text/plain", |
|
||||||
".ebuild" => "text/plain", |
|
||||||
".eclass" => "text/plain", |
|
||||||
".rtf" => "application/rtf", |
|
||||||
".bmp" => "image/bmp", |
|
||||||
".tif" => "image/tiff", |
|
||||||
".tiff" => "image/tiff", |
|
||||||
".ico" => "image/x-icon", |
|
||||||
".dtd" => "text/xml", |
|
||||||
".xml" => "text/xml", |
|
||||||
".mpeg" => "video/mpeg", |
|
||||||
".mpg" => "video/mpeg", |
|
||||||
".mov" => "video/quicktime", |
|
||||||
".qt" => "video/quicktime", |
|
||||||
".avi" => "video/x-msvideo", |
|
||||||
".asf" => "video/x-ms-asf", |
|
||||||
".asx" => "video/x-ms-asf", |
|
||||||
".wmv" => "video/x-ms-wmv", |
|
||||||
".bz2" => "application/x-bzip", |
|
||||||
".tbz" => "application/x-bzip-compressed-tar", |
|
||||||
".wasm" => "application/wasm", |
|
||||||
".tar.bz2" => "application/x-bzip-compressed-tar" |
|
||||||
) |
|
||||||
|
|
Loading…
Reference in new issue