mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-05 12:05:01 +00:00
18 lines
406 B
Text
18 lines
406 B
Text
|
# Setup env
|
||
|
FROM rust:1.33
|
||
|
RUN mkdir -p /opt/lemmy/server--dev
|
||
|
WORKDIR /opt/lemmy/server--dev
|
||
|
# Create empty directory where the frontend would normally be
|
||
|
RUN mkdir -p /opt/lemmy/ui--dev/dist
|
||
|
# Enable deps caching
|
||
|
RUN mkdir -p src/bin
|
||
|
RUN echo 'fn main() { println!("Dummy") }' >src/bin/main.rs
|
||
|
# Install deps
|
||
|
COPY Cargo.toml .
|
||
|
COPY Cargo.lock .
|
||
|
RUN cargo build
|
||
|
# Add app
|
||
|
COPY . .
|
||
|
# Run app
|
||
|
CMD cargo run
|