Compare commits

...

1 Commits

Author SHA1 Message Date
Jef Roosens e358757b19
[#68] Removed unnecessary target; added builder building to fej
continuous-integration/drone the build was successful Details
2021-05-13 21:01:15 +02:00
5 changed files with 10 additions and 9 deletions

View File

@ -2,9 +2,9 @@
# Our entire toolchain runs in alpine
FROM alpine:3.13.5 AS builder
ENV PATH "$PATH:/root/.cargo/bin"
ENV PATH="$PATH:/root/.cargo/bin" \
# Needed for proper compiling of openssl-dev
ENV RUSTFLAGS "-C target-feature=-crt-static"
RUSTFLAGS="-C target-feature=-crt-static"
# Add the build user
# Install dependencies

View File

@ -7,7 +7,6 @@ ENV RUST_BACKTRACE 1
COPY --chown=builder:builder Cargo.toml Cargo.lock ./
COPY --chown=builder:builder src/ ./src/
COPY --chown=builder:builder migrations/ ./migrations/
COPY --chown=builder:builder ./docker/entrypoint_dev.sh /entrypoint.sh
COPY --chown=builder:builder ./Rocket.toml /app/Rocket.toml
ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["cargo"]

View File

@ -19,7 +19,6 @@ COPY --chown=builder:builder migrations/ ./migrations/
RUN cargo install \
--path . \
--root /app/output \
--target x86_64-unknown-linux-musl \
--features frontend

View File

@ -1,4 +0,0 @@
#!/usr/bin/env sh
# All this file does is inject the target
cargo "$@" --target x86_64-unknown-linux-musl

7
fejctl
View File

@ -19,6 +19,13 @@ function dc() {
done
shift $((OPTIND-1))
if [[ "$build_builder" -eq 1 ]]; then
DOCKER_BUILDKIT=1 docker build \
-t "$image-builder:latest" \
-f docker/Dockerfile.builder \
.
fi
if [[ "$release" -eq 1 ]]; then
DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose \
--file docker/docker-compose.yml \