mirror of
https://git.verdigado.com/NB-Public/simple-wkd.git
synced 2024-10-30 01:25:53 +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
|
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
1
backend/.gitignore
vendored
|
@ -1,4 +1,3 @@
|
||||||
/target
|
/target
|
||||||
/data
|
/data
|
||||||
/logs
|
/logs
|
||||||
config.toml
|
|
|
@ -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!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue