diff --git a/Dockerfile b/Dockerfile index 6b728f8..dc4a979 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ COPY ./frontend/elm.json ./elm.json COPY ./frontend/src ./src COPY ./frontend/tests ./tests -RUN elm make src/Main.elm +RUN elm make --optimize src/Main.elm FROM ekidd/rust-musl-builder:stable as backend diff --git a/backend/Dockerfile b/backend/Dockerfile deleted file mode 100644 index 6528846..0000000 --- a/backend/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM ekidd/rust-musl-builder:stable as builder - -# create new cargo project -RUN USER=rust cargo init --bin -# copy build config -COPY --chown=rust ./Cargo.lock ./Cargo.lock -COPY --chown=rust ./Cargo.toml ./Cargo.toml -# build to cache dependencies -RUN cargo build --release -# delete build cache to prevent caching issues later on -RUN rm -r ./target/x86_64-unknown-linux-musl/release/.fingerprint/gitache-* - -COPY ./static ./static -COPY ./src ./src -# build source code -RUN cargo build --release - - -# create /etc/password for rootless scratch container -FROM alpine:latest as user_builder -RUN USER=root adduser -D -u 10001 dummy - -FROM scratch - -# copy certificates -COPY --from=linuxkit/ca-certificates:v0.7 / / -COPY --from=user_builder /etc/passwd /etc/passwd -USER dummy - -COPY --from=builder /home/rust/src/target/x86_64-unknown-linux-musl/release/gitache / - -ENTRYPOINT ["/gitache"] diff --git a/frontend/Dockerfile b/frontend/Dockerfile deleted file mode 100644 index c871092..0000000 --- a/frontend/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM node:alpine - -RUN yarn global add elm elm-test - -COPY ./elm.json ./elm.json -COPY ./src ./src -COPY ./tests ./tests - -RUN elm make src/Main.elm