Skip to content

Commit

Permalink
Add mail config
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreben committed Oct 26, 2023
1 parent 4c6d00d commit 07b9a16
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
16 changes: 15 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
FROM ruby:2.7.1

WORKDIR /home
USER root

# Install and setup mail
RUN apt update
RUN apt-get install -y bsd-mailx
RUN apt-get install -y sendmail

WORKDIR /etc/mail

RUN echo \"AuthInfo:smtp.domain.com "U:USERNAME" "P:PASSWORD" "M:PLAIN"\" > authinfo
RUN makemap hash authinfo < authinfo
RUN make

WORKDIR /home/cybersource

COPY . .

RUN bundle install
4 changes: 2 additions & 2 deletions cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: CronJob
metadata:
name: cybersource
spec:
schedule: "*/1 * * * *"
schedule: "30 8 3 * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
Expand All @@ -19,7 +19,7 @@ spec:
name: db-connect-modules
imagePullPolicy: Always
command: [ "/bin/bash", "-c", "--" ]
args: [ "rake download_report >> files/reports.log" 2>&1 ]
args: [ "cd /etc/mail && make && service sendmail restart; cd /home/cybersource && rake download_report >> files/reports.log" 2>&1;" ]
volumeMounts:
- mountPath: home/files
name: cybersource-files
Expand Down
2 changes: 1 addition & 1 deletion debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
imagePullPolicy: Always
# Just spin & wait forever
command: [ "/bin/bash", "-c", "--" ]
args: [ "cd /home; while true; do sleep 30; done;" ]
args: [ "cd /etc/mail && make && service sendmail restart; while true; do sleep 30; done;" ]
volumeMounts:
- mountPath: /home/cyberlog
name: cyberlog
Expand Down

0 comments on commit 07b9a16

Please sign in to comment.