use webassembly with the server acting only as an intermediate
This commit is contained in:
parent
9aa1130c35
commit
7d0ef62c42
29 changed files with 850 additions and 325 deletions
10
Dockerfile
10
Dockerfile
|
@ -7,20 +7,20 @@ ADD . /src
|
|||
WORKDIR /src
|
||||
|
||||
RUN cargo build --release
|
||||
RUN strip target/release/woweb-poc
|
||||
RUN strip target/release/woweb
|
||||
|
||||
RUN adduser -D woweb
|
||||
|
||||
RUN sed -i 's|ws://localhost:3000/ws|wss://woweb.vanwa.ch/ws|' assets/index.js
|
||||
RUN sed -i 's|ws://localhost:3000/ws|wss://woweb.vanwa.ch/ws|' woweb/assets/index.js
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=builder /etc/passwd /etc/passwd
|
||||
COPY --from=builder /src/target/release/woweb-poc "/opt/woweb-poc"
|
||||
COPY --from=builder /src/assets "/opt/assets"
|
||||
COPY --from=builder /src/target/release/woweb "/opt/woweb"
|
||||
COPY --from=builder /src/woweb/assets "/opt/assets"
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
WORKDIR /opt
|
||||
USER woweb
|
||||
CMD ["/opt/woweb-poc", "0.0.0.0:3000"]
|
||||
CMD ["/opt/woweb", "0.0.0.0:3000"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue