chore: merge wip

This commit is contained in:
meeg_leeto 2022-04-21 22:12:24 +01:00
commit 97d19a5b80
2 changed files with 14 additions and 7 deletions

View File

@ -8,14 +8,19 @@ WORKDIR /lonk
COPY ./Cargo.lock /lonk/Cargo.lock
COPY ./Cargo.toml /lonk/Cargo.toml
ARG PROFILE
RUN cargo build
RUN rm /lonk/src/*.rs
RUN rm src/*.rs
# Compile the source
COPY ./src /lonk/src
RUN rm /lonk/target/${PROFILE:-debug}/deps/lonk*
COPY ./src ./src
RUN rm ./target/${PROFILE:-release}/deps/lonk*
RUN cargo build
RUN cp /lonk/target/${PROFILE:-debug}/lonk /bin/lonk
WORKDIR /bin
CMD ["./lonk"]
# Execution container
FROM rust:latest
ARG PROFILE
COPY --from=builder /lonk/target/${PROFILE:-release}/lonk .
CMD ["./lonk"]

View File

@ -1,10 +1,12 @@
version: "3.9"
services:
lonk:
build: .
build:
context: .
args:
PROFILE: debug
environment:
- LONK_CONFIG="/data/config.json"
- PROFILE
volumes:
- ./data:/data
ports: