switch to docker packages. good bye docker hub
This commit is contained in:
parent
9b039af758
commit
59b7bdd2b5
16
.github/workflows/build-docker.yml
vendored
16
.github/workflows/build-docker.yml
vendored
|
@ -6,6 +6,10 @@ on:
|
|||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: $(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -16,7 +20,7 @@ jobs:
|
|||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
DOCKER_IMAGE="hascheksolutions/opentrashmail"
|
||||
DOCKER_IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
|
||||
VERSION=latest
|
||||
SHORTREF=${GITHUB_SHA::8}
|
||||
|
||||
|
@ -46,12 +50,12 @@ jobs:
|
|||
id: buildx
|
||||
uses: docker/setup-buildx-action@master
|
||||
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build
|
||||
uses: docker/build-push-action@v2
|
||||
|
|
|
@ -72,19 +72,19 @@ Just edit the `config.ini` You can use the following settings
|
|||
Simple start with no persistence
|
||||
|
||||
```bash
|
||||
docker run -it -p 25:25 -p 80:80 hascheksolutions/opentrashmail
|
||||
docker run -it -p 25:25 -p 80:80 ghcr.io/hascheksolutions/opentrashmail
|
||||
```
|
||||
|
||||
Saving data directory on host machine
|
||||
|
||||
```bash
|
||||
docker run -p 80:80 -p 25:25 -v /path/on/host/where/to/save/data:/var/www/opentrashmail/data hascheksolutions/opentrashmail
|
||||
docker run -p 80:80 -p 25:25 -v /path/on/host/where/to/save/data:/var/www/opentrashmail/data ghcr.io/hascheksolutions/opentrashmail
|
||||
```
|
||||
|
||||
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 ghcr.io/hascheksolutions/opentrashmail
|
||||
```
|
||||
|
||||
# How it works
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
From the `docker` directory run
|
||||
|
||||
```bash
|
||||
docker build -t hascheksolutions/opentrashmail . && docker run --rm -it --name trashmail -p 3000:80 -p 2525:25 hascheksolutions/opentrashmail
|
||||
docker build -t opentrashmail . && docker run --rm -it --name trashmail -p 3000:80 -p 2525:25 opentrashmail
|
||||
```
|
||||
|
||||
And check if it works on http://localhost:3000
|
Loading…
Reference in a new issue