0
0
Fork 0
mirror of https://git.verdigado.com/NB-Public/simple-wkd.git synced 2024-12-06 14:52:41 +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
COPY Cargo.lock .
COPY Cargo.toml .
RUN apk add --no-cache openssl-dev musl-dev
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install clang nettle-dev pkg-config libssl-dev -y
COPY backend .
RUN cargo build --release
FROM node:19-alpine3.17 AS webpage-builder
FROM node:19 AS webpage-builder
COPY website .
RUN npm install -g pnpm && \
@ -17,11 +17,16 @@ COPY assets assets
RUN mv dist assets/webpage
FROM alpine:3.17
FROM debian:bullseye-slim
WORKDIR /wkd
RUN adduser --no-create-home --disabled-password wkd && \
chown -R wkd:wkd /wkd
RUN export DEBIAN_FRONTEND=noninteractive && \
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
COPY --from=webpage-builder assets assets
COPY --from=bin-builder target/release/simple-wkd wkd

3
backend/.gitignore vendored
View file

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

View file

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