tangled
alpha
login
or
join now
nonbinary.computer
/
weaver
atproto blogging
24
fork
atom
overview
issues
2
pulls
pipelines
dockerfile for server
Orual
3 months ago
bace6b72
5b07a7ff
+41
2 changed files
expand all
collapse all
unified
split
.dockerignore
Dockerfile
+6
.dockerignore
···
1
1
+
**/target
2
2
+
**/dist
3
3
+
LICENSES
4
4
+
LICENSE
5
5
+
temp
6
6
+
**/README.md
+35
Dockerfile
···
1
1
+
FROM rust:1 AS chef
2
2
+
RUN cargo install cargo-chef
3
3
+
WORKDIR /app
4
4
+
5
5
+
FROM chef AS planner
6
6
+
COPY . .
7
7
+
RUN cargo chef prepare --recipe-path recipe.json
8
8
+
9
9
+
10
10
+
FROM chef AS builder
11
11
+
COPY --from=planner /app/recipe.json recipe.json
12
12
+
RUN cargo chef cook --release --recipe-path recipe.json
13
13
+
COPY . .
14
14
+
15
15
+
# Install `dx`
16
16
+
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
17
17
+
RUN cargo binstall dioxus-cli --root /.cargo -y --force
18
18
+
ENV PATH="/.cargo/bin:$PATH"
19
19
+
20
20
+
# Create the final bundle folder. Bundle always executes in release mode with optimizations enabled
21
21
+
RUN dx bundle -p weaver-server
22
22
+
23
23
+
FROM chef AS runtime
24
24
+
25
25
+
COPY --from=builder /app/target/dx/weaver_server/release/web/ /usr/local/app
26
26
+
27
27
+
# set our port and make sure to listen for all connections
28
28
+
ENV PORT=8080
29
29
+
ENV IP=0.0.0.0
30
30
+
31
31
+
# expose the port 8080
32
32
+
EXPOSE 8080
33
33
+
34
34
+
WORKDIR /usr/local/app
35
35
+
ENTRYPOINT [ "/usr/local/app/weaver-server" ]