Skip to content

Conversation

@meysam81
Copy link
Owner

@meysam81 meysam81 commented Dec 2, 2025

Add deployment templates and referral links for multiple cloud providers:

PaaS:

  • Railway (with referral code)
  • Render
  • Heroku
  • DigitalOcean App Platform
  • Koyeb
  • Zeabur
  • Northflank
  • Fly.io

Enterprise Cloud:

  • Google Cloud Run
  • Azure Container Apps

Self-Hosted:

  • CapRover
  • Coolify

Changes:

  • Add deploy/ directory with provider-specific templates
  • Add "Deploy Your Own Instance" section to README with deploy buttons
  • Add matrix-based template validation in CI
  • Add Fly.io deployment sync job (requires FLY_API_TOKEN secret)

claude and others added 2 commits December 2, 2025 03:00
Add deployment templates and referral links for multiple cloud providers:

PaaS:
- Railway (with referral code)
- Render
- Heroku
- DigitalOcean App Platform
- Koyeb
- Zeabur
- Northflank
- Fly.io

Enterprise Cloud:
- Google Cloud Run
- Azure Container Apps

Self-Hosted:
- CapRover
- Coolify

Changes:
- Add deploy/ directory with provider-specific templates
- Add "Deploy Your Own Instance" section to README with deploy buttons
- Add matrix-based template validation in CI
- Add Fly.io deployment sync job (requires FLY_API_TOKEN secret)
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds one-click deployment support for 12+ cloud providers, but contains critical configuration bugs that will prevent all deployments from working. The main issue is that all deployment templates use incorrect environment variable names with a PARSE_DMARC_ prefix (e.g., PARSE_DMARC_IMAP_HOST), but the application expects variables without this prefix (e.g., IMAP_HOST), as defined in internal/config/config.go. Additional issues include incorrect GitHub Actions syntax, missing persistent storage configuration for Azure and Google Cloud, and Fly.io TOML syntax errors.

Key Issues:

  • Critical: All 9 deployment templates use wrong environment variable names (PARSE_DMARC_* instead of unprefixed names)
  • Critical: Azure Container Apps and Google Cloud Run templates lack persistent volume configuration, causing data loss on restarts
  • Critical: GitHub Actions workflow has incorrect conditional syntax for checking secrets
  • Moderate: Fly.io template has incorrect TOML syntax for mounts and VM configuration

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 26 comments.

Show a summary per file
File Description
deploy/zeabur.json Zeabur template with incorrect env var names
deploy/render.yaml Render blueprint with incorrect env var names
deploy/railway.json Railway template with incorrect env var names and unnecessary startCommand
deploy/northflank.json Northflank template (env vars configured via UI)
deploy/koyeb.yaml Koyeb config with incorrect env var names
deploy/heroku.yml Heroku container config with incorrect startCommand
deploy/fly.toml Fly.io config with incorrect env var names and TOML syntax errors
deploy/digitalocean-app.yaml DigitalOcean App Platform spec with incorrect env var names
deploy/coolify.yaml Coolify docker-compose with incorrect env var names
deploy/cloudbuild.yaml Google Cloud Build config with incorrect env var names and missing volumes
deploy/captain-definition CapRover definition (minimal, correct)
deploy/azure-container-apps.bicep Azure Bicep template with incorrect env var names, missing volumes, and outdated API version
deploy/app.json Heroku app manifest with incorrect env var names
deploy/README.md Deployment documentation with incorrect env var names
README.md Main readme with deployment buttons and potentially incorrect template URLs
.github/workflows/ci.yml CI workflow with template validation and incorrect conditional syntax

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +25 to +33
resource environment 'Microsoft.App/managedEnvironments@2023-05-01' = {
name: environmentName
location: location
properties: {
zoneRedundant: false
}
}

resource containerApp 'Microsoft.App/containerApps@2023-05-01' = {
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API version 2023-05-01 is outdated. As of December 2025, newer stable API versions are available (e.g., 2024-03-01 or later). Consider updating to a more recent API version to access newer features and improvements. You can check the latest stable versions at: https://learn.microsoft.com/en-us/azure/templates/microsoft.app/containerapps

The same API version is used on line 33 for the containerApp resource.

Copilot uses AI. Check for mistakes.
| **Coolify** | [![Deploy to Coolify](https://img.shields.io/badge/Deploy-Coolify-6B46C1?style=for-the-badge&logo=docker)](https://github.com/meysam81/parse-dmarc) | Open-source Heroku alternative |
| **Docker** | [![Docker](https://img.shields.io/badge/Docker-Pull%20Image-2496ED?style=for-the-badge&logo=docker)](https://github.com/meysam81/parse-dmarc/pkgs/container/parse-dmarc) | Run anywhere |

> **Note**: All deployments require IMAP credentials. See [Configuration](#configuration-options) for details on setting up Gmail, Outlook, or other email providers.
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note references [Configuration](#configuration-options) for setting up IMAP credentials, but the Configuration Options section (line 163) only shows JSON configuration file examples, not environment variables. Since all the deployment buttons use environment variables (not config files), consider adding documentation for environment variable configuration or updating the link to point to the deploy/README.md which has the environment variable reference table.

Suggested change
> **Note**: All deployments require IMAP credentials. See [Configuration](#configuration-options) for details on setting up Gmail, Outlook, or other email providers.
> **Note**: All deployments require IMAP credentials. See [Environment Variables](./deploy/README.md#environment-variables) for details on setting up Gmail, Outlook, or other email providers.

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +44
"PARSE_DMARC_DATABASE_PATH": {
"default": "/data/db.sqlite",
"expose": true
},
"PARSE_DMARC_IMAP_HOST": {
"default": "",
"expose": true,
"required": true
},
"PARSE_DMARC_IMAP_MAILBOX": {
"default": "INBOX",
"expose": true
},
"PARSE_DMARC_IMAP_PASSWORD": {
"default": "",
"expose": true,
"required": true
},
"PARSE_DMARC_IMAP_PORT": {
"default": "993",
"expose": true
},
"PARSE_DMARC_IMAP_USERNAME": {
"default": "",
"expose": true,
"required": true
},
"PARSE_DMARC_IMAP_USE_TLS": {
"default": "true",
"expose": true
},
"PARSE_DMARC_SERVER_HOST": {
"default": "0.0.0.0",
"expose": true
},
"PARSE_DMARC_SERVER_PORT": {
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical: Environment variable names are incorrect. The application expects environment variables WITHOUT the PARSE_DMARC_ prefix (e.g., IMAP_HOST, IMAP_PORT, DATABASE_PATH, SERVER_HOST, SERVER_PORT), as defined in internal/config/config.go. All variables in this template have the wrong prefix:

  • PARSE_DMARC_DATABASE_PATH should be DATABASE_PATH
  • PARSE_DMARC_IMAP_HOST should be IMAP_HOST
  • PARSE_DMARC_IMAP_MAILBOX should be IMAP_MAILBOX
  • PARSE_DMARC_IMAP_PASSWORD should be IMAP_PASSWORD
  • PARSE_DMARC_IMAP_PORT should be IMAP_PORT
  • PARSE_DMARC_IMAP_USERNAME should be IMAP_USERNAME
  • PARSE_DMARC_IMAP_USE_TLS should be IMAP_USE_TLS
  • PARSE_DMARC_SERVER_HOST should be SERVER_HOST
  • PARSE_DMARC_SERVER_PORT should be SERVER_PORT

Without this fix, the deployment will not work as the application won't be able to read the configuration.

Suggested change
"PARSE_DMARC_DATABASE_PATH": {
"default": "/data/db.sqlite",
"expose": true
},
"PARSE_DMARC_IMAP_HOST": {
"default": "",
"expose": true,
"required": true
},
"PARSE_DMARC_IMAP_MAILBOX": {
"default": "INBOX",
"expose": true
},
"PARSE_DMARC_IMAP_PASSWORD": {
"default": "",
"expose": true,
"required": true
},
"PARSE_DMARC_IMAP_PORT": {
"default": "993",
"expose": true
},
"PARSE_DMARC_IMAP_USERNAME": {
"default": "",
"expose": true,
"required": true
},
"PARSE_DMARC_IMAP_USE_TLS": {
"default": "true",
"expose": true
},
"PARSE_DMARC_SERVER_HOST": {
"default": "0.0.0.0",
"expose": true
},
"PARSE_DMARC_SERVER_PORT": {
"DATABASE_PATH": {
"default": "/data/db.sqlite",
"expose": true
},
"IMAP_HOST": {
"default": "",
"expose": true,
"required": true
},
"IMAP_MAILBOX": {
"default": "INBOX",
"expose": true
},
"IMAP_PASSWORD": {
"default": "",
"expose": true,
"required": true
},
"IMAP_PORT": {
"default": "993",
"expose": true
},
"IMAP_USERNAME": {
"default": "",
"expose": true,
"required": true
},
"IMAP_USE_TLS": {
"default": "true",
"expose": true
},
"SERVER_HOST": {
"default": "0.0.0.0",
"expose": true
},
"SERVER_PORT": {

Copilot uses AI. Check for mistakes.
Comment on lines +24 to +48
- key: PARSE_DMARC_IMAP_HOST
scope: RUN_TIME
type: SECRET
- key: PARSE_DMARC_IMAP_PORT
scope: RUN_TIME
value: "993"
- key: PARSE_DMARC_IMAP_USERNAME
scope: RUN_TIME
type: SECRET
- key: PARSE_DMARC_IMAP_PASSWORD
scope: RUN_TIME
type: SECRET
- key: PARSE_DMARC_IMAP_MAILBOX
scope: RUN_TIME
value: "INBOX"
- key: PARSE_DMARC_IMAP_USE_TLS
scope: RUN_TIME
value: "true"
- key: PARSE_DMARC_DATABASE_PATH
scope: RUN_TIME
value: "/data/db.sqlite"
- key: PARSE_DMARC_SERVER_PORT
scope: RUN_TIME
value: "8080"
- key: PARSE_DMARC_SERVER_HOST
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical: Environment variable names are incorrect. The application expects environment variables WITHOUT the PARSE_DMARC_ prefix (e.g., IMAP_HOST, IMAP_PORT, DATABASE_PATH, SERVER_HOST, SERVER_PORT), as defined in internal/config/config.go. All variables should be renamed:

  • PARSE_DMARC_IMAP_HOSTIMAP_HOST
  • PARSE_DMARC_IMAP_PORTIMAP_PORT
  • PARSE_DMARC_IMAP_USERNAMEIMAP_USERNAME
  • PARSE_DMARC_IMAP_PASSWORDIMAP_PASSWORD
  • PARSE_DMARC_IMAP_MAILBOXIMAP_MAILBOX
  • PARSE_DMARC_IMAP_USE_TLSIMAP_USE_TLS
  • PARSE_DMARC_DATABASE_PATHDATABASE_PATH
  • PARSE_DMARC_SERVER_PORTSERVER_PORT
  • PARSE_DMARC_SERVER_HOSTSERVER_HOST

Without this fix, the deployment will not work as the application won't be able to read the configuration.

Suggested change
- key: PARSE_DMARC_IMAP_HOST
scope: RUN_TIME
type: SECRET
- key: PARSE_DMARC_IMAP_PORT
scope: RUN_TIME
value: "993"
- key: PARSE_DMARC_IMAP_USERNAME
scope: RUN_TIME
type: SECRET
- key: PARSE_DMARC_IMAP_PASSWORD
scope: RUN_TIME
type: SECRET
- key: PARSE_DMARC_IMAP_MAILBOX
scope: RUN_TIME
value: "INBOX"
- key: PARSE_DMARC_IMAP_USE_TLS
scope: RUN_TIME
value: "true"
- key: PARSE_DMARC_DATABASE_PATH
scope: RUN_TIME
value: "/data/db.sqlite"
- key: PARSE_DMARC_SERVER_PORT
scope: RUN_TIME
value: "8080"
- key: PARSE_DMARC_SERVER_HOST
- key: IMAP_HOST
scope: RUN_TIME
type: SECRET
- key: IMAP_PORT
scope: RUN_TIME
value: "993"
- key: IMAP_USERNAME
scope: RUN_TIME
type: SECRET
- key: IMAP_PASSWORD
scope: RUN_TIME
type: SECRET
- key: IMAP_MAILBOX
scope: RUN_TIME
value: "INBOX"
- key: IMAP_USE_TLS
scope: RUN_TIME
value: "true"
- key: DATABASE_PATH
scope: RUN_TIME
value: "/data/db.sqlite"
- key: SERVER_PORT
scope: RUN_TIME
value: "8080"
- key: SERVER_HOST

Copilot uses AI. Check for mistakes.
docker:
web: Dockerfile
run:
web: /app/parse-dmarc --config=/app/config.json
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The run command specifies --config=/app/config.json, but Heroku deployments using app.json rely on environment variables, not mounted config files. Since the config file won't exist in the container, this command will likely fail.

The Dockerfile's default CMD already includes --config=/app/config.json, and the application will fall back to environment variables when the config file doesn't exist (as seen in internal/config/config.go). Consider removing this line to use the Dockerfile's default ENTRYPOINT and CMD.

Suggested change
web: /app/parse-dmarc --config=/app/config.json
web: /app/parse-dmarc

Copilot uses AI. Check for mistakes.
source = "parse_dmarc_data"
destination = "/data"

[[vm]]
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The [[vm]] section uses deprecated syntax. According to Fly.io's current documentation, VM configuration should be specified using [vm] (single brackets) for a single machine, not [[vm]] (double brackets). The configuration should be:

[vm]
  size = "shared-cpu-1x"
  memory = "256mb"

Note: The size and memory fields might also be outdated - Fly.io now uses machine presets like shared-cpu-1x which includes both CPU and memory specifications.

Suggested change
[[vm]]
[vm]

Copilot uses AI. Check for mistakes.
containers: [
{
name: 'parse-dmarc'
image: 'ghcr.io/meysam81/parse-dmarc:latest'
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a floating image tag ghcr.io/meysam81/parse-dmarc:latest allows silent supply‑chain compromise: if the upstream image is replaced, future revisions of this template will pull unverified code and run it. Pin the image to an immutable digest or a specific signed version tag (e.g., ghcr.io/meysam81/parse-dmarc:v1.1.0@sha256:<digest>).

Suggested change
image: 'ghcr.io/meysam81/parse-dmarc:latest'
image: 'ghcr.io/meysam81/parse-dmarc:v1.1.0@sha256:<digest>'

Copilot uses AI. Check for mistakes.
-e PARSE_DMARC_IMAP_USERNAME=your-email@gmail.com \
-e PARSE_DMARC_IMAP_PASSWORD=your-app-password \
-v parse-dmarc-data:/data \
ghcr.io/meysam81/parse-dmarc:latest
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Floating image tag ghcr.io/meysam81/parse-dmarc:latest in this Docker run example enables pulling a modified image later without review, leading to potential arbitrary code execution. Use a fixed version tag or digest (e.g., ghcr.io/meysam81/parse-dmarc:v1.1.0@sha256:<digest>) to ensure image integrity.

Suggested change
ghcr.io/meysam81/parse-dmarc:latest
ghcr.io/meysam81/parse-dmarc:v1.1.0@sha256:<digest>

Copilot uses AI. Check for mistakes.

# Or deploy directly
gcloud run deploy parse-dmarc \
--image ghcr.io/meysam81/parse-dmarc:latest \
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Floating image tag ghcr.io/meysam81/parse-dmarc:latest in this Cloud Run deploy command can pull a tampered image if the tag is overwritten, enabling supply‑chain attacks. Pin to a specific version or image digest (e.g., --image ghcr.io/meysam81/parse-dmarc:v1.1.0@sha256:<digest>) to guarantee integrity.

Copilot uses AI. Check for mistakes.
Comment on lines +28 to +31
| **Koyeb** | [![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?name=parse-dmarc&type=docker&image=ghcr.io/meysam81/parse-dmarc:latest&ports=8080;http;/) | Global edge deployment |
| **Zeabur** | [![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/parse-dmarc) | Asia-Pacific optimized |
| **Northflank** | [![Deploy to Northflank](https://northflank.com/button.svg)](https://app.northflank.com/s/account/templates/new?externalTemplateId=parse-dmarc) | Developer-focused |
| **Fly.io** | [![Deploy to Fly.io](https://img.shields.io/badge/Deploy-Fly.io-7B3FE4?style=for-the-badge&logo=fly.io)](https://fly.io/launch?image=ghcr.io/meysam81/parse-dmarc:latest) | Edge computing |
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unpinned latest image references (ghcr.io/meysam81/parse-dmarc:latest) in these one‑click deploy links mean users may launch an unintended or malicious future build if the tag is updated, leading to unreviewed code execution. Update the links to use a stable version tag or signed digest (e.g., ...parse-dmarc:v1.1.0 or a digest URL) to ensure reproducible, trusted deployments.

Suggested change
| **Koyeb** | [![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?name=parse-dmarc&type=docker&image=ghcr.io/meysam81/parse-dmarc:latest&ports=8080;http;/) | Global edge deployment |
| **Zeabur** | [![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/parse-dmarc) | Asia-Pacific optimized |
| **Northflank** | [![Deploy to Northflank](https://northflank.com/button.svg)](https://app.northflank.com/s/account/templates/new?externalTemplateId=parse-dmarc) | Developer-focused |
| **Fly.io** | [![Deploy to Fly.io](https://img.shields.io/badge/Deploy-Fly.io-7B3FE4?style=for-the-badge&logo=fly.io)](https://fly.io/launch?image=ghcr.io/meysam81/parse-dmarc:latest) | Edge computing |
| **Koyeb** | [![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?name=parse-dmarc&type=docker&image=ghcr.io/meysam81/parse-dmarc:v1.1.0&ports=8080;http;/) | Global edge deployment |
| **Zeabur** | [![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/parse-dmarc) | Asia-Pacific optimized |
| **Northflank** | [![Deploy to Northflank](https://northflank.com/button.svg)](https://app.northflank.com/s/account/templates/new?externalTemplateId=parse-dmarc) | Developer-focused |
| **Fly.io** | [![Deploy to Fly.io](https://img.shields.io/badge/Deploy-Fly.io-7B3FE4?style=for-the-badge&logo=fly.io)](https://fly.io/launch?image=ghcr.io/meysam81/parse-dmarc:v1.1.0) | Edge computing |

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants