37 lines
1.0 KiB
Plaintext
37 lines
1.0 KiB
Plaintext
FROM ubuntu:24.04
|
|
|
|
ENV RUSTUP_HOME=/usr/local/rustup \
|
|
CARGO_HOME=/usr/local/cargo \
|
|
PATH=/usr/local/cargo/bin:$PATH
|
|
|
|
RUN apt update
|
|
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y gcc gcc-multilib pkg-config libssl-dev curl mysql-client-8.0 npm
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --profile minimal --default-toolchain nightly
|
|
|
|
WORKDIR /usr/src/reminder-rs
|
|
|
|
# Docker is shit
|
|
COPY ./.sqlx ./.sqlx
|
|
COPY ./assets ./assets
|
|
COPY ./conf ./conf
|
|
COPY ./extract_derive ./extract_derive
|
|
COPY ./migrations ./migrations
|
|
COPY ./recordable_derive ./recordable_derive
|
|
COPY ./reminder-dashboard ./reminder-dashboard
|
|
COPY ./src ./src
|
|
COPY ./static ./static
|
|
COPY ./templates ./templates
|
|
COPY ./build.rs ./
|
|
COPY ./Cargo.lock ./
|
|
COPY ./Cargo.toml ./
|
|
COPY ./dp.py ./
|
|
|
|
# Build dashboard assets explicitly to ensure dist exists
|
|
RUN npm ci --prefix reminder-dashboard && npm run build --prefix reminder-dashboard
|
|
|
|
# Build and install the Rust binary
|
|
RUN cargo install --path .
|
|
|
|
EXPOSE 18920
|
|
CMD ["reminder-rs"]
|