-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 994 Bytes
/
Dockerfile
File metadata and controls
33 lines (24 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM rust:1.92.0-bookworm AS build
RUN apt-get update \
&& apt-get install -y --no-install-recommends nodejs npm ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
RUN npx --yes --package typescript tsc -p sdk/tsconfig.json
RUN npx --yes esbuild demo/src/main.ts --bundle --outfile=demo/public/main.js --format=esm --external:lucide --alias:muxquito-webrtc-sdk=./sdk/dist/index.js
RUN cargo build -p muxq --release
FROM debian:bookworm-slim
WORKDIR /app
COPY --from=build /app/target/release/muxq /app/muxq
COPY --from=build /app/demo/public /app/static
COPY --from=build /app/server/static/ui /app/ui
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
ENV BIND_ADDR=0.0.0.0:8080
ENV STATIC_DIR=/app/static
ENV UI_DIR=/app/ui
ENV PUBLIC_BASE_PATH=/muxquito
EXPOSE 8080
EXPOSE 10000-10100/udp
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
RUN chmod +x /app/docker-entrypoint.sh
ENTRYPOINT ["/app/docker-entrypoint.sh"]