mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix the docker build
use source from github repo
This commit is contained in:
parent
1517202889
commit
09358570b3
@ -1,16 +1,23 @@
|
|||||||
|
|
||||||
FROM rust:1.53.0
|
FROM rust:latest
|
||||||
# Let's switch our working directory to `app` (equivalent to `cd app`)
|
# Let's switch our working directory to `app` (equivalent to `cd app`)
|
||||||
# The `app` folder will be created for us by Docker in case it does not
|
# The `app` folder will be created for us by Docker in case it does not
|
||||||
# exist already.
|
# exist already.
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY . .
|
RUN apt-get update -y \
|
||||||
|
&& apt-get install -y --no-install-recommends git \
|
||||||
|
# Clean up
|
||||||
|
&& apt-get autoremove -y \
|
||||||
|
&& apt-get clean -y \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN git clone https://github.com/AppFlowy-IO/appflowy.git .
|
||||||
|
|
||||||
WORKDIR /app/backend
|
WORKDIR /app/backend
|
||||||
ENV SQLX_OFFLINE true
|
ENV SQLX_OFFLINE true
|
||||||
ENV APP_ENVIRONMENT production
|
ENV APP_ENVIRONMENT production
|
||||||
RUN cargo build --release
|
RUN RUSTFLAGS="-C opt-level=2" cargo build --release
|
||||||
|
|
||||||
# When `docker run` is executed, launch the binary!
|
# When `docker run` is executed, launch the binary!
|
||||||
ENTRYPOINT ["./target/release/backend"]
|
ENTRYPOINT ["./target/release/backend"]
|
||||||
|
Loading…
Reference in New Issue
Block a user