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:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
IMAGE_NAME: $(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -16,7 +20,7 @@ jobs:
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
id: prep
|
id: prep
|
||||||
run: |
|
run: |
|
||||||
DOCKER_IMAGE="hascheksolutions/opentrashmail"
|
DOCKER_IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
|
||||||
VERSION=latest
|
VERSION=latest
|
||||||
SHORTREF=${GITHUB_SHA::8}
|
SHORTREF=${GITHUB_SHA::8}
|
||||||
|
|
||||||
|
@ -46,12 +50,12 @@ jobs:
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@master
|
uses: docker/setup-buildx-action@master
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Log in to the Container registry
|
||||||
if: github.event_name != 'pull_request'
|
uses: docker/login-action@v2
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
registry: ${{ env.REGISTRY }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: docker/build-push-action@v2
|
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
|
Simple start with no persistence
|
||||||
|
|
||||||
```bash
|
```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
|
Saving data directory on host machine
|
||||||
|
|
||||||
```bash
|
```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
|
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
|
```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
|
# How it works
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
From the `docker` directory run
|
From the `docker` directory run
|
||||||
|
|
||||||
```bash
|
```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
|
And check if it works on http://localhost:3000
|
Loading…
Reference in a new issue