Compare commits
1 commit
main
...
revert_doc
Author | SHA1 | Date | |
---|---|---|---|
8f05ca1464 |
2 changed files with 17 additions and 7 deletions
13
docker/dev/Dockerfile
vendored
13
docker/dev/Dockerfile
vendored
|
@ -18,13 +18,18 @@ RUN sudo chown -R rust:rust .
|
||||||
RUN USER=root cargo new server
|
RUN USER=root cargo new server
|
||||||
WORKDIR /app/server
|
WORKDIR /app/server
|
||||||
COPY server/Cargo.toml server/Cargo.lock ./
|
COPY server/Cargo.toml server/Cargo.lock ./
|
||||||
COPY server/lemmy_db ./lemmy_db
|
RUN mkdir -p lemmy_db/src/ lemmy_utils/src/
|
||||||
COPY server/lemmy_utils ./lemmy_utils
|
COPY server/lemmy_db/Cargo.toml ./lemmy_db/
|
||||||
|
COPY server/lemmy_utils/Cargo.toml ./lemmy_utils/
|
||||||
RUN mkdir -p ./src/bin \
|
RUN mkdir -p ./src/bin \
|
||||||
&& echo 'fn main() { println!("Dummy") }' > ./src/bin/main.rs
|
&& echo 'fn main() { println!("Dummy") }' > ./src/bin/main.rs \
|
||||||
|
&& cp ./src/bin/main.rs ./lemmy_db/src/main.rs \
|
||||||
|
&& cp ./src/bin/main.rs ./lemmy_utils/src/main.rs
|
||||||
RUN cargo build
|
RUN cargo build
|
||||||
RUN find target/debug -type f -name "$(echo "lemmy_server" | tr '-' '_')*" -exec touch -t 200001010000 {} +
|
RUN rm -f ./target/x86_64-unknown-linux-musl/debug/deps/lemmy_server*
|
||||||
COPY server/src ./src/
|
COPY server/src ./src/
|
||||||
|
COPY server/lemmy_db ./lemmy_db/
|
||||||
|
COPY server/lemmy_utils ./lemmy_utils/
|
||||||
COPY server/migrations ./migrations/
|
COPY server/migrations ./migrations/
|
||||||
|
|
||||||
# Build for debug
|
# Build for debug
|
||||||
|
|
11
docker/prod/Dockerfile
vendored
11
docker/prod/Dockerfile
vendored
|
@ -11,13 +11,18 @@ RUN sudo chown -R rust:rust .
|
||||||
RUN USER=root cargo new server
|
RUN USER=root cargo new server
|
||||||
WORKDIR /app/server
|
WORKDIR /app/server
|
||||||
COPY server/Cargo.toml server/Cargo.lock ./
|
COPY server/Cargo.toml server/Cargo.lock ./
|
||||||
COPY server/lemmy_db ./lemmy_db
|
RUN mkdir -p lemmy_db/src/ lemmy_utils/src/
|
||||||
COPY server/lemmy_utils ./lemmy_utils
|
COPY server/lemmy_db/Cargo.toml ./lemmy_db/
|
||||||
|
COPY server/lemmy_utils/Cargo.toml ./lemmy_utils/
|
||||||
RUN mkdir -p ./src/bin \
|
RUN mkdir -p ./src/bin \
|
||||||
&& echo 'fn main() { println!("Dummy") }' > ./src/bin/main.rs
|
&& echo 'fn main() { println!("Dummy") }' > ./src/bin/main.rs \
|
||||||
|
&& cp ./src/bin/main.rs ./lemmy_db/src/main.rs \
|
||||||
|
&& cp ./src/bin/main.rs ./lemmy_utils/src/main.rs
|
||||||
RUN cargo build --release
|
RUN cargo build --release
|
||||||
RUN find target/$CARGO_BUILD_TARGET/$RUSTRELEASEDIR -type f -name "$(echo "lemmy_server" | tr '-' '_')*" -exec touch -t 200001010000 {} +
|
RUN find target/$CARGO_BUILD_TARGET/$RUSTRELEASEDIR -type f -name "$(echo "lemmy_server" | tr '-' '_')*" -exec touch -t 200001010000 {} +
|
||||||
COPY server/src ./src/
|
COPY server/src ./src/
|
||||||
|
COPY server/lemmy_db ./lemmy_db/
|
||||||
|
COPY server/lemmy_utils ./lemmy_utils/
|
||||||
COPY server/migrations ./migrations/
|
COPY server/migrations ./migrations/
|
||||||
|
|
||||||
# build for release
|
# build for release
|
||||||
|
|
Loading…
Reference in a new issue