Added Send mail functionality & Dockerized application #1

Merged
PeterSurda merged 11 commits from cis-kuldeep/influx-smtp-gateway:master into master 2022-02-21 06:41:14 +00:00
3 changed files with 4 additions and 6 deletions
Showing only changes of commit 65bedd6356 - Show all commits

View File

@ -14,4 +14,5 @@ COPY ./requirements.txt .
RUN pip install -r requirements.txt
# copy project
COPY . .
COPY . .
PeterSurda marked this conversation as resolved Outdated

let's call it something else

let's call it something else
ENTRYPOINT ["/usr/src/app/entrypoint.sh"]
PeterSurda marked this conversation as resolved Outdated

run as non-root

run as non-root

this doesn't do anything. The Dockerfile should create a non-privileged user and then just before ENTRYPOINT have a corresponding USER instruction.

this doesn't do anything. The `Dockerfile` should create a non-privileged user and then just before `ENTRYPOINT` have a corresponding `USER` instruction.

View File

@ -4,12 +4,7 @@ services:
web:
PeterSurda marked this conversation as resolved Outdated

smtp-gateway:

`smtp-gateway:`
build: .
command: python main.py
PeterSurda marked this conversation as resolved Outdated

perhaps this should be inside the Dockerfile

perhaps this should be inside the `Dockerfile`
volumes:
- mailsend_server:/usr/src/app/
ports:
PeterSurda marked this conversation as resolved Outdated

If we only use this internally inside a docker service, we should use expose, not port.

If we only use this internally inside a docker service, we should use `expose`, not `port`.
- 8081:8081
env_file:
- ./config.ini
PeterSurda marked this conversation as resolved Outdated

wrong file

wrong file
volumes:
mailsend_server:

2
entrypoint.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
python main.py