-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1784ac0
commit 7f4c814
Showing
4 changed files
with
142 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
RELAYER_ENDPOINT=http://localhost:4500/api/receiveEmail | ||
|
||
IMAP_LOGIN_ID= | ||
IMAP_DOMAIN_NAME=imap.gmail.com | ||
IMAP_PORT=993 | ||
AUTH_TYPE=password | ||
|
||
IMAP_LOGIN_PASSWORD= | ||
# OR | ||
IMAP_CLIENT_ID= | ||
IMAP_CLIENT_SECRET= | ||
IMAP_AUTH_URL= | ||
IMAP_TOKEN_URL= | ||
IMAP_REDIRECT_URL= | ||
|
||
JSON_LOGGER=false | ||
|
||
SERVER_HOST=localhost | ||
SERVER_PORT=3000 | ||
SMTP_DOMAIN_NAME=smtp.gmail.com | ||
SMTP_LOGIN_ID= | ||
SMTP_LOGIN_PASSWORD= | ||
|
||
EMAIL_ACCOUNT_RECOVERY_VERSION_ID=1 | ||
PRIVATE_KEY= | ||
CHAIN_RPC_PROVIDER=https://sepolia.era.zksync.dev | ||
CHAIN_RPC_EXPLORER=https://sepolia-era.zksync.network | ||
CHAIN_ID=300 | ||
|
||
SMTP_SERVER="http://localhost:3000/api/sendEmail" | ||
|
||
PROVER_ADDRESS="https://zkemail--email-auth-prover-v1-5-2-flask-app.modal.run" | ||
|
||
DATABASE_URL="postgres://test@localhost/emailauth_test" | ||
RELAYER_EMAIL_ADDR= | ||
WEB_SERVER_ADDRESS="127.0.0.1:4500" | ||
EMAIL_TEMPLATES_PATH=./eml_templates | ||
REGEX_JSON_DIR_PATH="./src/regex_json" | ||
|
||
DKIM_CANISTER_ID="fxmww-qiaaa-aaaaj-azu7a-cai" | ||
WALLET_CANISTER_ID= | ||
PEM_PATH="./.ic.pem" | ||
IC_REPLICA_URL="https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=fxmww-qiaaa-aaaaj-azu7a-cai" | ||
|
||
CIRCUITS_DIR_PATH=../circuits | ||
|
||
ERROR_EMAIL_ADDR="[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,37 @@ | ||
# Use the official Rust image as a base image | ||
FROM rust:latest | ||
# Use the official Rust image as the base image for building | ||
FROM rust:1.73 AS builder | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
# Install necessary dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
pkg-config \ | ||
libssl-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Clone the GitHub repository | ||
RUN git clone https://github.com/zkemail/relayer-imap.git | ||
# Set the working directory in the container | ||
WORKDIR /usr/src/relayer-imap | ||
|
||
# Change to the directory of the cloned repository | ||
WORKDIR /app/relayer-imap | ||
# Clone the repository | ||
RUN git clone https://github.com/zkemail/relayer-imap.git . | ||
|
||
# Build the Rust package | ||
RUN cargo build | ||
# Build the application | ||
RUN cargo build --release | ||
|
||
# Specify the command to run when the container starts | ||
CMD ["cargo", "run", "--bin", "relayer-imap"] | ||
# Use a minimal base image for the final stage | ||
FROM debian:bookworm-slim | ||
|
||
# Install necessary runtime dependencies including ca-certificates | ||
RUN apt-get update && apt-get install -y \ | ||
pkg-config \ | ||
libssl-dev \ | ||
ca-certificates \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy the built binary from the builder stage | ||
COPY --from=builder /usr/src/relayer-imap/target/release/relayer-imap /usr/local/bin/relayer-imap | ||
|
||
# Expose the port the app runs on | ||
EXPOSE 8080 | ||
|
||
# Set the default command to run the application | ||
CMD ["/usr/local/bin/relayer-imap"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,36 @@ | ||
# Use the official Rust image as a base image | ||
FROM rust:latest | ||
# Use the official Rust image as the base image for building | ||
FROM rust:1.73 AS builder | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
# Install necessary dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
pkg-config \ | ||
libssl-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Clone the GitHub repository | ||
RUN git clone https://github.com/zkemail/relayer-smtp.git | ||
# Set the working directory in the container | ||
WORKDIR /usr/src/relayer-smtp | ||
|
||
# Change to the directory of the cloned repository | ||
WORKDIR /app/relayer-smtp | ||
# Clone the repository | ||
RUN git clone https://github.com/zkemail/relayer-smtp.git . | ||
|
||
# Build the Rust package | ||
RUN cargo build | ||
# Build the application | ||
RUN cargo build --release | ||
|
||
# Expose port | ||
EXPOSE 3000 | ||
# Use a minimal base image for the final stage | ||
FROM debian:bookworm-slim | ||
|
||
# Specify the command to run when the container starts | ||
CMD ["cargo", "run", "--bin", "relayer-smtp"] | ||
# Install necessary runtime dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
pkg-config \ | ||
libssl-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy the built binary from the builder stage | ||
COPY --from=builder /usr/src/relayer-smtp/target/release/relayer-smtp /usr/local/bin/relayer-smtp | ||
|
||
# Expose the port the app runs on | ||
EXPOSE 8080 | ||
|
||
# Set the default command to run the application | ||
CMD ["/usr/local/bin/relayer-smtp"] |