Skip to content

Commit bb39149

Browse files
committed
Fix DendriteJS dockerfile
1 parent 8a1dfff commit bb39149

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

build/docker/DendriteJS.Dockerfile

+37-37
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ FROM golang:1.14-alpine AS gobuild
99

1010
# Download and build dendrite
1111
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
1515
RUN GOOS=js GOARCH=wasm go build -o main.wasm ./cmd/dendritejs
1616

1717

@@ -21,7 +21,7 @@ RUN apt-get update && apt-get -y install python
2121

2222
# Download riot-web and libp2p repos
2323
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
2525
RUN tar xvfz libp2p.tar.gz
2626
ADD https://github.com/vector-im/element-web/archive/matthew/p2p.tar.gz /build/p2p.tar.gz
2727
RUN tar xvfz p2p.tar.gz
@@ -31,21 +31,21 @@ WORKDIR /build/element-web-matthew-p2p
3131
RUN yarn install
3232
RUN ln -s /build/go-http-js-libp2p-master /build/element-web-matthew-p2p/node_modules/go-http-js-libp2p
3333
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
3535
# build it all
3636
RUN yarn build:p2p
3737

3838
SHELL ["/bin/bash", "-c"]
3939
RUN echo $'\
40-
{ \n\
40+
{ \n\
4141
"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\
4949
}, \n\
5050
"disable_custom_urls": false, \n\
5151
"disable_guests": true, \n\
@@ -55,57 +55,57 @@ RUN echo $'\
5555
"integrations_ui_url": "https://scalar.vector.im/", \n\
5656
"integrations_rest_url": "https://scalar.vector.im/api", \n\
5757
"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\
6363
], \n\
6464
"integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html", \n\
6565
"bug_report_endpoint_url": "https://riot.im/bugreports/submit", \n\
6666
"defaultCountryCode": "GB", \n\
6767
"showLabsSettings": false, \n\
6868
"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\
7373
}, \n\
7474
"default_federate": true, \n\
7575
"default_theme": "light", \n\
7676
"roomDirectory": { \n\
77-
"servers": [ \n\
78-
"matrix.org" \n\
79-
] \n\
77+
"servers": [ \n\
78+
"matrix.org" \n\
79+
] \n\
8080
}, \n\
8181
"welcomeUserId": "", \n\
8282
"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\
8787
}, \n\
8888
"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\
9191
}, \n\
9292
"settingDefaults": { \n\
93-
"breadcrumbs": true \n\
93+
"breadcrumbs": true \n\
9494
} \n\
95-
}' > webapp/config.json
95+
}' > webapp/config.json
9696

9797
FROM nginx
9898
# Add "Service-Worker-Allowed: /" header so the worker can sniff traffic on this domain rather
9999
# than just the path this gets hosted under. NB this newline echo syntax only works on bash.
100100
SHELL ["/bin/bash", "-c"]
101101
RUN echo $'\
102-
server { \n\
102+
server { \n\
103103
listen 80; \n\
104104
add_header \'Service-Worker-Allowed\' \'/\'; \n\
105105
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\
108108
} \n\
109-
}' > /etc/nginx/conf.d/default.conf
109+
}' > /etc/nginx/conf.d/default.conf
110110
RUN sed -i 's/}/ application\/wasm wasm;\n}/g' /etc/nginx/mime.types
111111
COPY --from=jsbuild /build/element-web-matthew-p2p/webapp /usr/share/nginx/html

0 commit comments

Comments
 (0)