An API for things.
docker-compose run --rm --service-ports scrobbler-server
You can also add something like cargo run --bin api if you just want to run the API.
docker-compose run --rm --service-ports scrobbler-server-dev
This project is using Diesel as the ORM.
I didn't want to install Postgres on my system so I could use the Diesel CLI, so it's dockerized.
docker-compose run --rm diesel-cli
# cd core
# diesel setup
# diesel migration run
I've wasted more than 6 hours tryin got get it to build for ARM.
The CI allows native building on arm so I can just specify the architecture and let it build for me. This is the simplest solution.
Gets completely stuck when trying to compile hyper, I've left it compiling for about half a day before the shell completely locks up and I can't even SSH into the thing.
Trying to cross-compile really sucks. I tried all kinda of things.
As of Docker v19.03.13, docker buildx can only be used by enabling experimental features.
docker buildx build --platform linux/arm/v7 .
It seems like specifying the target should work:
FROM rust:1.49
ARG TARGET="arm-unknown-linux-gnueabihf"
WORKDIR /app
RUN rustup default nightly
RUN rustup target add $TARGET
RUN apt-get update
RUN apt-get install build-essential -y
RUN mkdir .cargo
Will end up with errors like:
COPY . .
RUN cargo build --target=$TARGET
But this just errors with:
error: linking with `cc` failed: exit code: 1
If I try specifying a linker then I get something like this:
error: linker `aarch64-unknown-linux-musl` not found