mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-27 06:41:18 +00:00
build: Improve server compile time with cache
This commit is contained in:
parent
beb4981c22
commit
74db51c6cd
3 changed files with 12 additions and 10 deletions
|
@ -11,13 +11,13 @@
|
||||||
|
|
||||||
A link aggregator / reddit clone for the fediverse.
|
A link aggregator / reddit clone for the fediverse.
|
||||||
|
|
||||||
[Lemmy Dev instance](https://dev.lemmy.ml) _for testing purposes only_
|
[Lemmy Dev instance](https://dev.lemmy.ml) *for testing purposes only*
|
||||||
|
|
||||||
This is a **very early beta version**, and a lot of features are currently broken or in active development, such as federation.
|
This is a **very early beta version**, and a lot of features are currently broken or in active development, such as federation.
|
||||||
|
|
||||||
| Front Page | Post |
|
|Front Page|Post|
|
||||||
| ----------------------------------------------- | ----------------------------------------------- |
|
|-----------------------------------------------|----------------------------------------------- |
|
||||||
| ![main screen](https://i.imgur.com/y64BtXC.png) | ![chat screen](https://i.imgur.com/vsOr87q.png) |
|
|![main screen](https://i.imgur.com/y64BtXC.png)|![chat screen](https://i.imgur.com/vsOr87q.png) |
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Setup env
|
# Setup env
|
||||||
FROM rust:1.33
|
FROM rust:1.33
|
||||||
RUN mkdir -p /opt/lemmy/server--dev
|
RUN USER=root cargo new --bin /opt/lemmy/server--dev
|
||||||
WORKDIR /opt/lemmy/server--dev
|
WORKDIR /opt/lemmy/server--dev
|
||||||
# Create empty directory where the frontend would normally be
|
# Create empty directory where the frontend would normally be
|
||||||
RUN mkdir -p /opt/lemmy/ui--dev/dist
|
RUN mkdir -p /opt/lemmy/ui--dev/dist
|
||||||
|
@ -10,8 +10,12 @@ RUN echo 'fn main() { println!("Dummy") }' >src/bin/main.rs
|
||||||
# Install deps
|
# Install deps
|
||||||
COPY Cargo.toml .
|
COPY Cargo.toml .
|
||||||
COPY Cargo.lock .
|
COPY Cargo.lock .
|
||||||
RUN cargo build
|
RUN cargo build --release
|
||||||
|
RUN rm src/bin/main.rs
|
||||||
# Add app
|
# Add app
|
||||||
COPY . .
|
COPY src/ src/
|
||||||
|
COPY migrations/ migrations/
|
||||||
|
RUN rm target/release/deps/lemmy*
|
||||||
|
RUN cargo build --release
|
||||||
# Run app
|
# Run app
|
||||||
CMD cargo run
|
CMD ["/opt/lemmy/server--dev/target/release/lemmy"]
|
||||||
|
|
|
@ -8,8 +8,6 @@ profiles:
|
||||||
context: server
|
context: server
|
||||||
docker:
|
docker:
|
||||||
dockerfile: Dockerfile.dev
|
dockerfile: Dockerfile.dev
|
||||||
sync:
|
|
||||||
"***/*.rs": .
|
|
||||||
- image: registry.gitlab.com/pojntfx/lemmy/ui.dev
|
- image: registry.gitlab.com/pojntfx/lemmy/ui.dev
|
||||||
context: ui
|
context: ui
|
||||||
docker:
|
docker:
|
||||||
|
|
Loading…
Reference in a new issue