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.lock /lonk/Cargo.lock
COPY ./Cargo.toml /lonk/Cargo.toml COPY ./Cargo.toml /lonk/Cargo.toml
ARG PROFILE
RUN cargo build RUN cargo build
RUN rm /lonk/src/*.rs RUN rm src/*.rs
# Compile the source # Compile the source
COPY ./src /lonk/src COPY ./src ./src
RUN rm /lonk/target/${PROFILE:-debug}/deps/lonk* RUN rm ./target/${PROFILE:-release}/deps/lonk*
RUN cargo build RUN cargo build
RUN cp /lonk/target/${PROFILE:-debug}/lonk /bin/lonk RUN cp /lonk/target/${PROFILE:-debug}/lonk /bin/lonk
WORKDIR /bin # Execution container
CMD ["./lonk"] FROM rust:latest
ARG PROFILE
COPY --from=builder /lonk/target/${PROFILE:-release}/lonk .
CMD ["./lonk"]

View File

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