mirror of
https://git.verdigado.com/NB-Public/simple-wkd.git
synced 2024-12-04 08:52:51 +01:00
Return to debian for docker
This commit is contained in:
parent
da472a23ff
commit
ca8bcfaa96
5 changed files with 17 additions and 11 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
config.toml
|
23
Dockerfile
23
Dockerfile
|
@ -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
3
backend/.gitignore
vendored
|
@ -1,4 +1,3 @@
|
|||
/target
|
||||
/data
|
||||
/logs
|
||||
config.toml
|
||||
/logs
|
|
@ -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!");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue