-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (28 loc) · 860 Bytes
/
Dockerfile
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
34
35
36
37
FROM node:22-bullseye AS builder
ENV PATH="/root/.cargo/bin:$PATH"
RUN apt-get update \
&& apt-get upgrade -y \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
COPY --chown=default:users . /app
WORKDIR /app
RUN cd frontend \
&& npm ci \
&& npm run build \
&& cd .. \
&& cargo build --release
FROM debian:bullseye-slim
RUN apt-get update \
&& apt-get upgrade -y \
&& useradd -d /app default \
&& mkdir -p /app/data \
&& mkdir -p /app/config \
&& chown -R default:users /app \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/podscribe-cli /app/podscribe-cli
COPY --from=builder /app/frontend/dist /app/frontend/dist
COPY --from=builder /app/assets /app/assets
WORKDIR /app
USER default
VOLUME /app/data
EXPOSE 5150
CMD ["/app/podscribe-cli", "start", "--environment=production"]