From 67d0c8653843f24a137a5239007670d0ed15e815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ioan=20Biz=C4=83u?= Date: Thu, 29 Feb 2024 10:55:14 +0200 Subject: [PATCH] Add postfix to our environment. --- .github/workflows/docker-publish.yml | 22 ++++++++++++++++++++++ docker-compose.dev.yml | 3 +++ docker-compose.staging.yml | 3 +++ docker-compose.yml | 12 ++++++++++++ services/postfix/Dockerfile | 1 + 5 files changed, 41 insertions(+) create mode 100644 services/postfix/Dockerfile diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 415fe50a..d2dc2a40 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -85,6 +85,28 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max + # Extract metadata (tags, labels) for Docker + # https://github.com/docker/metadata-action + - name: Extract Docker metadata (smtp) + id: meta-smtp + uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 + with: + images: ${{ env.REGISTRY }}/plebeiantech/plebeian-market-smtp + + # Build and push Docker image with Buildx + # https://github.com/docker/build-push-action + - name: Build and push Docker image (smtp) + id: build-and-push-smtp + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 + with: + context: ./ + file: ./services/postfix/Dockerfile + push: true + tags: ${{ steps.meta-relay.outputs.tags }} + labels: ${{ steps.meta-relay.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + # Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action - name: Extract Docker metadata (api) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index cec8ee32..9de0cc19 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -13,6 +13,9 @@ services: type: tmpfs ports: - "7777:7777" + smtp: + ports: + - "1587:587" api: healthcheck: test: ["CMD", "curl", "-f", "http://localhost:5000/api/status"] diff --git a/docker-compose.staging.yml b/docker-compose.staging.yml index 1cc936e7..123941db 100644 --- a/docker-compose.staging.yml +++ b/docker-compose.staging.yml @@ -11,6 +11,9 @@ services: - "7777:7777" networks: - proxy + smtp: + ports: + - "1587:587" api: healthcheck: test: ["CMD", "curl", "-f", "https://staging.plebeian.market/api/status"] diff --git a/docker-compose.yml b/docker-compose.yml index bb88cfa8..edd6b49e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,13 @@ services: restart: always networks: - relay_network + smtp: + build: + context: ./ + dockerfile: ./services/postfix/Dockerfile + restart: always + networks: + - smtp_network api: build: context: ./ @@ -26,6 +33,7 @@ services: networks: - db_network - proxy + - smtp_network finalize-auctions: build: context: ./ @@ -46,6 +54,7 @@ services: stop_grace_period: 1m networks: - db_network + - smtp_network settle-lightning-payments: build: context: ./ @@ -56,6 +65,7 @@ services: stop_grace_period: 30s networks: - db_network + - smtp_network birdwatcher: build: context: ./ @@ -70,5 +80,7 @@ networks: driver: bridge relay_network: driver: bridge + smtp_network: + driver: bridge proxy: driver: bridge diff --git a/services/postfix/Dockerfile b/services/postfix/Dockerfile new file mode 100644 index 00000000..1eac3909 --- /dev/null +++ b/services/postfix/Dockerfile @@ -0,0 +1 @@ +FROM boky/postfix:latest \ No newline at end of file