@@ -9,9 +9,9 @@ FROM golang:1.14-alpine AS gobuild
9
9
10
10
# Download and build dendrite
11
11
WORKDIR /build
12
- ADD https://github.com/matrix-org/dendrite/archive/master .tar.gz /build/master .tar.gz
13
- RUN tar xvfz master .tar.gz
14
- WORKDIR /build/dendrite-master
12
+ ADD https://github.com/matrix-org/dendrite/archive/main .tar.gz /build/main .tar.gz
13
+ RUN tar xvfz main .tar.gz
14
+ WORKDIR /build/dendrite-main
15
15
RUN GOOS=js GOARCH=wasm go build -o main.wasm ./cmd/dendritejs
16
16
17
17
@@ -21,7 +21,7 @@ RUN apt-get update && apt-get -y install python
21
21
22
22
# Download riot-web and libp2p repos
23
23
WORKDIR /build
24
- ADD https://github.com/matrix-org/go-http-js-libp2p/archive/master .tar.gz /build/libp2p.tar.gz
24
+ ADD https://github.com/matrix-org/go-http-js-libp2p/archive/main .tar.gz /build/libp2p.tar.gz
25
25
RUN tar xvfz libp2p.tar.gz
26
26
ADD https://github.com/vector-im/element-web/archive/matthew/p2p.tar.gz /build/p2p.tar.gz
27
27
RUN tar xvfz p2p.tar.gz
@@ -31,21 +31,21 @@ WORKDIR /build/element-web-matthew-p2p
31
31
RUN yarn install
32
32
RUN ln -s /build/go-http-js-libp2p-master /build/element-web-matthew-p2p/node_modules/go-http-js-libp2p
33
33
RUN (cd node_modules/go-http-js-libp2p && yarn install)
34
- COPY --from=gobuild /build/dendrite-master /main.wasm ./src/vector/dendrite.wasm
34
+ COPY --from=gobuild /build/dendrite-main /main.wasm ./src/vector/dendrite.wasm
35
35
# build it all
36
36
RUN yarn build:p2p
37
37
38
38
SHELL ["/bin/bash" , "-c" ]
39
39
RUN echo $'\
40
- { \n \
40
+ { \n \
41
41
"default_server_config": { \n \
42
- "m.homeserver": { \n \
43
- "base_url": "https://p2p.riot.im", \n \
44
- "server_name": "p2p.riot.im" \n \
45
- }, \n \
46
- "m.identity_server": { \n \
47
- "base_url": "https://vector.im" \n \
48
- } \n \
42
+ "m.homeserver": { \n \
43
+ "base_url": "https://p2p.riot.im", \n \
44
+ "server_name": "p2p.riot.im" \n \
45
+ }, \n \
46
+ "m.identity_server": { \n \
47
+ "base_url": "https://vector.im" \n \
48
+ } \n \
49
49
}, \n \
50
50
"disable_custom_urls": false, \n \
51
51
"disable_guests": true, \n \
@@ -55,57 +55,57 @@ RUN echo $'\
55
55
"integrations_ui_url": "https://scalar.vector.im/", \n \
56
56
"integrations_rest_url": "https://scalar.vector.im/api", \n \
57
57
"integrations_widgets_urls": [ \n \
58
- "https://scalar.vector.im/_matrix/integrations/v1", \n \
59
- "https://scalar.vector.im/api", \n \
60
- "https://scalar-staging.vector.im/_matrix/integrations/v1", \n \
61
- "https://scalar-staging.vector.im/api", \n \
62
- "https://scalar-staging.riot.im/scalar/api" \n \
58
+ "https://scalar.vector.im/_matrix/integrations/v1", \n \
59
+ "https://scalar.vector.im/api", \n \
60
+ "https://scalar-staging.vector.im/_matrix/integrations/v1", \n \
61
+ "https://scalar-staging.vector.im/api", \n \
62
+ "https://scalar-staging.riot.im/scalar/api" \n \
63
63
], \n \
64
64
"integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html", \n \
65
65
"bug_report_endpoint_url": "https://riot.im/bugreports/submit", \n \
66
66
"defaultCountryCode": "GB", \n \
67
67
"showLabsSettings": false, \n \
68
68
"features": { \n \
69
- "feature_pinning": "labs", \n \
70
- "feature_custom_status": "labs", \n \
71
- "feature_custom_tags": "labs", \n \
72
- "feature_state_counters": "labs" \n \
69
+ "feature_pinning": "labs", \n \
70
+ "feature_custom_status": "labs", \n \
71
+ "feature_custom_tags": "labs", \n \
72
+ "feature_state_counters": "labs" \n \
73
73
}, \n \
74
74
"default_federate": true, \n \
75
75
"default_theme": "light", \n \
76
76
"roomDirectory": { \n \
77
- "servers": [ \n \
78
- "matrix.org" \n \
79
- ] \n \
77
+ "servers": [ \n \
78
+ "matrix.org" \n \
79
+ ] \n \
80
80
}, \n \
81
81
"welcomeUserId": "", \n \
82
82
"piwik": { \n \
83
- "url": "https://piwik.riot.im/", \n \
84
- "whitelistedHSUrls": ["https://matrix.org"], \n \
85
- "whitelistedISUrls": ["https://vector.im", "https://matrix.org"], \n \
86
- "siteId": 1 \n \
83
+ "url": "https://piwik.riot.im/", \n \
84
+ "whitelistedHSUrls": ["https://matrix.org"], \n \
85
+ "whitelistedISUrls": ["https://vector.im", "https://matrix.org"], \n \
86
+ "siteId": 1 \n \
87
87
}, \n \
88
88
"enable_presence_by_hs_url": { \n \
89
- "https://matrix.org": false, \n \
90
- "https://matrix-client.matrix.org": false \n \
89
+ "https://matrix.org": false, \n \
90
+ "https://matrix-client.matrix.org": false \n \
91
91
}, \n \
92
92
"settingDefaults": { \n \
93
- "breadcrumbs": true \n \
93
+ "breadcrumbs": true \n \
94
94
} \n \
95
- }' > webapp/config.json
95
+ }' > webapp/config.json
96
96
97
97
FROM nginx
98
98
# Add "Service-Worker-Allowed: /" header so the worker can sniff traffic on this domain rather
99
99
# than just the path this gets hosted under. NB this newline echo syntax only works on bash.
100
100
SHELL ["/bin/bash" , "-c" ]
101
101
RUN echo $'\
102
- server { \n \
102
+ server { \n \
103
103
listen 80; \n \
104
104
add_header \' Service-Worker-Allowed\' \' /\' ; \n \
105
105
location / { \n \
106
- root /usr/share/nginx/html; \n \
107
- index index.html index.htm; \n \
106
+ root /usr/share/nginx/html; \n \
107
+ index index.html index.htm; \n \
108
108
} \n \
109
- }' > /etc/nginx/conf.d/default.conf
109
+ }' > /etc/nginx/conf.d/default.conf
110
110
RUN sed -i 's/}/ application\/ wasm wasm;\n }/g' /etc/nginx/mime.types
111
111
COPY --from=jsbuild /build/element-web-matthew-p2p/webapp /usr/share/nginx/html
0 commit comments