updated readme to include current version in docker examples

This commit is contained in:
Chris 2023-11-13 10:18:51 +01:00
parent 41c412e40f
commit c256989b7e
2 changed files with 20 additions and 7 deletions

View file

@ -118,19 +118,19 @@ This in combination with the configuration option "DOMAINS" (eg docker parameter
Simple start with no persistence
```bash
docker run -it -p 25:25 -p 80:80 -e URL="https://localhost:80" hascheksolutions/opentrashmail
docker run -it -p 25:25 -p 80:80 -e URL="https://localhost:80" hascheksolutions/opentrashmail:1
```
Saving data directory on host machine
```bash
docker run -p 80:80 -p 25:25 -e URL="https://localhost:80" -v /path/on/host/where/to/save/data:/var/www/opentrashmail/data hascheksolutions/opentrashmail
docker run -p 80:80 -p 25:25 -e URL="https://localhost:80" -v /path/on/host/where/to/save/data:/var/www/opentrashmail/data hascheksolutions/opentrashmail:1
```
Complete example with running as daemon, persistence, a domain for auto-generation of emails, acceptng only emails for configured domains, cleanup for mails older than 90 days and auto restart
```bash
docker run -d --restart=unless-stopped --name opentrashmail -e "DOMAINS=mydomain.eu" -e "DATEFORMAT='D.M.YYYY HH:mm'" -e "DISCARD_UNKNOWN=false" -e "DELETE_OLDER_THAN_DAYS=90" -p 80:80 -p 25:25 -v /path/on/host/where/to/save/data:/var/www/opentrashmail/data hascheksolutions/opentrashmail
docker run -d --restart=unless-stopped --name opentrashmail -e "DOMAINS=mydomain.eu" -e "DATEFORMAT='D.M.YYYY HH:mm'" -e "DISCARD_UNKNOWN=false" -e "DELETE_OLDER_THAN_DAYS=90" -p 80:80 -p 25:25 -v /path/on/host/where/to/save/data:/var/www/opentrashmail/data hascheksolutions/opentrashmail:1
```
# How it works

View file

@ -1,12 +1,25 @@
# Quick testing
# Local dev
From the main directory run
## Web UI
For testing the web UI you need to have php installed. From within the `web/` directory run `php -S localhost:8080 index.php` then you will be able to access the UI via http://localhost:8080
Since OpenTrashmail does not use a database, it will work right away but you won't be able to receive emails without running the python SMTP server.
## Mailserver
In combination with the PHP command from above you can use docker to run the mail server (since you probably don't have python2 installed on your machine).
From the root directory run:
```bash
docker build -f docker/Dockerfile -t opentrashmail . && docker run --rm -it --name trashmail -p 3000:80 -p 2525:25 opentrashmail
docker build -f docker/Dockerfile -t opentrashmail .
docker run --rm -it --name trashmail -p 2525:25 \
-v $( pwd )/data:/var/www/opentrashmail/data \
-v $( pwd )/config.ini:/var/www/opentrashmail/config.ini:ro opentrashmail
```
And check if it works on http://localhost:3000
This binds the mailserver on port 2525 and also mounts the local data directory and your `config.ini` to the container. So emails you receive will show up in your `data` folder.
## Sending debug emails from the command line