Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Enable both services
ENABLE_SMTP_GATEWAY=true
PORT=4500
SMTP_HOST=0.0.0.0
SMTP_PORT=1025
RUST_LOG=info

# SMTP backend configuration
TARGET_SMTP_SERVER=mail.sanalogistic.com
TARGET_SMTP_USERNAME=noreply@sanalogistic.com
TARGET_SMTP_PASSWORD=Sky@2007!!
TARGET_SMTP_FROM_NAME=Skyconnect Inc
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- "main"
- "feature"
- "feat/*"
- "v*"
tags:
Expand Down
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN mkdir -p src && \
# Build dependencies only - this is the caching Docker layer
RUN cargo build --release

# Remove the dummy source
# Remove the dummy source (updated binary name)
RUN rm ./target/release/deps/mail_sender* && \
rm src/main.rs

Expand All @@ -38,14 +38,17 @@ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

WORKDIR /app

# Copy binary from builder
# Copy binary from builder (updated binary name)
COPY --from=builder /app/target/release/mail-sender .

# Set environment variables
# Set default environment variables
ENV RUST_LOG=info
ENV PORT=4500
ENV SMTP_PORT=1025
ENV SMTP_HOST=0.0.0.0
ENV ENABLE_SMTP_GATEWAY=false

# Expose port - match the port specified in the ENV
EXPOSE 4500
# Expose both HTTP API and SMTP gateway ports
EXPOSE 4500 1025

ENTRYPOINT ["./mail-sender"]
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ services:
restart: always
networks:
- traefik_network
ports:
- "4500:4500"
- "1025:1025"
labels:
- "traefik.docker.network=traefik_network"
- "traefik.enable=true"
Expand Down
Loading