0
0
Fork 0
mirror of https://git.verdigado.com/NB-Public/simple-wkd.git synced 2024-10-30 01:05:53 +01:00

Return to debian for docker

This commit is contained in:
Delta1925 2023-04-16 22:20:45 +02:00
parent da472a23ff
commit ca8bcfaa96
No known key found for this signature in database
GPG key ID: 1C21ACE44193CB25
5 changed files with 17 additions and 11 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
config.toml

View file

@ -1,13 +1,13 @@
FROM rust:1.68-alpine3.17 AS bin-builder FROM rust:1.68 AS bin-builder
COPY backend backend RUN export DEBIAN_FRONTEND=noninteractive && \
COPY Cargo.lock . apt-get update && \
COPY Cargo.toml . apt-get install clang nettle-dev pkg-config libssl-dev -y
RUN apk add --no-cache openssl-dev musl-dev COPY backend .
RUN cargo build --release RUN cargo build --release
FROM node:19-alpine3.17 AS webpage-builder FROM node:19 AS webpage-builder
COPY website . COPY website .
RUN npm install -g pnpm && \ RUN npm install -g pnpm && \
@ -17,11 +17,16 @@ COPY assets assets
RUN mv dist assets/webpage RUN mv dist assets/webpage
FROM alpine:3.17 FROM debian:bullseye-slim
WORKDIR /wkd WORKDIR /wkd
RUN adduser --no-create-home --disabled-password wkd && \ RUN export DEBIAN_FRONTEND=noninteractive && \
chown -R wkd:wkd /wkd apt-get update && \
apt-get install ca-certificates -y && \
rm -rf /var/lib/apt/lists/* && \
adduser --no-create-home wkd && \
chown -R wkd:wkd /wkd && \
chmod -R 777 /wkd
USER wkd USER wkd
COPY --from=webpage-builder assets assets COPY --from=webpage-builder assets assets
COPY --from=bin-builder target/release/simple-wkd wkd COPY --from=bin-builder target/release/simple-wkd wkd

1
backend/.gitignore vendored
View file

@ -1,4 +1,3 @@
/target /target
/data /data
/logs /logs
config.toml

View file

@ -85,6 +85,7 @@ fn get_mailer() -> SmtpTransport {
.credentials(creds) .credentials(creds)
.port(SETTINGS.mail_settings.smtp_port) .port(SETTINGS.mail_settings.smtp_port)
.build(); .build();
debug!("Checking connection...");
if mailer.test_connection().is_err() { if mailer.test_connection().is_err() {
warn!("Connection test to smtp host failed!"); warn!("Connection test to smtp host failed!");
} }