3 Commits

Author SHA1 Message Date
jude
9c6c324b02 Remove npm build as its done by build.rs 2025-12-22 16:54:21 +00:00
jude
d7065cf0d6 Remove ignored file 2025-12-17 18:32:16 +00:00
jude
b0c6eedba9 Update run containerfile for /remind support 2025-11-26 18:35:20 +00:00
2 changed files with 13 additions and 40 deletions

View File

@@ -1,11 +1,10 @@
FROM ubuntu:24.04
FROM alpine:latest AS build
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 apk add gcc build-base pkgconfig openssl-dev openssl-libs-static curl mysql-client 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
@@ -26,11 +25,19 @@ 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 .
FROM alpine:latest AS runtime
WORKDIR /usr/src/reminder-rs
COPY --from=build /usr/local/cargo/bin/reminder-rs /usr/local/bin/reminder-rs
COPY --from=build /usr/src/reminder-rs/static /usr/src/reminder-rs/static
COPY --from=build /usr/src/reminder-rs/templates /usr/src/reminder-rs/templates
RUN apk add python3 py3-pip
RUN pip3 install --no-cache --break-system-packages dateparser
EXPOSE 18920
CMD ["reminder-rs"]

View File

@@ -1,34 +0,0 @@
<!DOCTYPE html>
<html lang="EN">
<head>
<meta name="description" content="The most powerful Discord Reminders Bot">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<meta name="yandex-verification" content="bb77b8681eb64a90"/>
<meta name="google-site-verification" content="7h7UVTeEe0AOzHiH3cFtsqMULYGN-zCZdMT_YCkW1Ho"/>
<!-- <meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src *; font-src fonts.gstatic.com 'self'"> -->
<!-- favicon -->
<link rel="apple-touch-icon" sizes="180x180"
href="/static/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32"
href="/static/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16"
href="/static/favicon/favicon-16x16.png">
<link rel="manifest" href="/static/site.webmanifest">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<title>Reminder Bot | Dashboard</title>
<!-- styles -->
<link rel="stylesheet" href="/static/css/fa.css">
<link rel="stylesheet" href="/static/css/font.css">
<link rel="stylesheet" href="/static/css/style.css">
<script type="module" crossorigin src="/static/assets/index-B8f0viPI.js"></script>
<link rel="stylesheet" crossorigin href="/static/assets/index-BZ8NJuKt.css">
</head>
<body>
<div id="app"></div>
</body>
</html>