From 0afad9d7d1c2798b4450ae6d8d8f1ed1c2fe13c9 Mon Sep 17 00:00:00 2001 From: Patrik Kernstock Date: Sat, 8 Aug 2020 22:04:40 +0100 Subject: [PATCH] Let's build everything via GitHub actions! --- .github/workflows/build-parsedmarc-init.yml | 23 +++++++++++++++++++ ...ntainer-build.yml => build-parsedmarc.yml} | 3 ++- README.md | 4 ++-- docker-compose.yml | 8 ++----- 4 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/build-parsedmarc-init.yml rename .github/workflows/{container-build.yml => build-parsedmarc.yml} (90%) diff --git a/.github/workflows/build-parsedmarc-init.yml b/.github/workflows/build-parsedmarc-init.yml new file mode 100644 index 0000000..fc3a83a --- /dev/null +++ b/.github/workflows/build-parsedmarc-init.yml @@ -0,0 +1,23 @@ +name: Build parsedmarc-init container + +on: + push: + paths: + - 'data/Dockerfiles/parsedmarc-init/**' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Build and push Docker image + uses: docker/build-push-action@v1 + with: + path: data/Dockerfiles/parsedmarc/ + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: patschi/parsedmarc + tags: init + add_git_labels: true diff --git a/.github/workflows/container-build.yml b/.github/workflows/build-parsedmarc.yml similarity index 90% rename from .github/workflows/container-build.yml rename to .github/workflows/build-parsedmarc.yml index 0983d1a..6835c32 100644 --- a/.github/workflows/container-build.yml +++ b/.github/workflows/build-parsedmarc.yml @@ -1,4 +1,5 @@ -name: container-build +name: Build parsedmarc container + on: push: paths: diff --git a/README.md b/README.md index a1b8eba..7117ce1 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ $ git clone https://github.com/patschi/parsedmarc-dockerzied.git # Edit docker-compose.yml and change environment variables below for geoipupdate from maxmind. # Edit data/conf/parsedmarc/config.ini for parsedmarc itself (and change test to False when tested!) $ docker-compose pull -$ docker-compose up -d --build +$ docker-compose up -d ``` -Then the whole stack is being built, created, started and the corresponding dashboard automatically imported into Kibana. After a while you can access the Kibana dashboard with parsed information by [parsedmarc](https://github.com/domainaware/checkdmarc) under the reverse proxy with an automatically self-signed certificate at `https://IP:9999`. \ No newline at end of file +Then the whole stack is being built, created, started and the corresponding dashboard automatically imported into Kibana. After a while you can access the Kibana dashboard with parsed information by [parsedmarc](https://github.com/domainaware/checkdmarc) under the reverse proxy with an automatically self-signed certificate at `https://IP:9999`. diff --git a/docker-compose.yml b/docker-compose.yml index 6fb37b4..7bb20d4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,9 +2,7 @@ version: '2.4' services: parsedmarc-init: - build: - context: ./data/Dockerfiles/parsedmarc-init/ - image: parsedmarc-init + image: patschi/parsedmarc:init restart: always volumes: - ./data/conf/parsedmarc/:/etc/parsedmarc/:rw @@ -20,9 +18,7 @@ services: start_period: 10s parsedmarc: - build: - context: ./data/Dockerfiles/parsedmarc/ - image: parsedmarc + image: patschi/parsedmarc:latest volumes: - ./data/conf/parsedmarc/:/etc/parsedmarc/ - ./data/data/geoipupdate/:/usr/share/GeoIP:z,ro