chore: merge wip
This commit is contained in:
commit
97d19a5b80
13
Dockerfile
13
Dockerfile
|
@ -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
|
||||||
|
FROM rust:latest
|
||||||
|
ARG PROFILE
|
||||||
|
COPY --from=builder /lonk/target/${PROFILE:-release}/lonk .
|
||||||
CMD ["./lonk"]
|
CMD ["./lonk"]
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue