Alexandre Danault

Alexandre Danault

Under review

Since there is a ton of options we can set for sites in Ploi, we end up in a situation where our infrastructure documentation is only in Ploi. Reproducing a site, or deployinh a new one ends up being complicated (many options to set) or risky (forgetting an option) and somewhat time-consuming.

Don't get me wrong, Ploi is AWESOME, I totally love it. What I'm looking for here is a way to move the Ploi configuiration INTO my code, with my project. That way, creating new project means Ploi would only have to ask for a repo/branch, and if my Ploi config is in there, start configuring everything for me.

My idea is a simple yaml file (or any other format) called "Ploifile.yaml" at the root of your repo, something like this:

  name: do-tor1-example
  # If this server name doesn't exist, create it using the info below (if supplied)
  # otherwise stop if it doesn't exist
  provider: digitalocean
  credentials: DO Alex
  region: tor1
  size: s-1vcpu-1gb
  os: ubuntu-22-04
  type: web

  provider: letsencrypt
  use_dns: true
  force: true

  name: Internal Tools # Ploi project will be created if it doesn't exist
  type: laravel
  project_directory: /
  web_directory: /public

  version: 8.3


  # if "octane" config it set, create/update a daemon for it
    server: swoole
    port: 8000
    max_requests: 500
    workers: auto
    watch: false
  # octane: false # To remove the octane daemon 
  # if the "reverb" config is set, create/update a daemon for it
    port: 8080
  reverbe: false # To remove the reverb daemon

  # Cron job will be created/updated
  - command: "php /path/to/artisan schedule:run"
    schedule: "* * * * *"
    user: ploi
  - ...

  php: 8.3
  connection: redis

    type: slack
    channel: "#deploy"

  # Redirects will be created/updated
  - from: /redir
  - ...

  # System user will be created/updated
  name: example  
  sudo: false


  # HTTP Basic Auth users/paths will be created/updated
  - path: /admin
    user: admin
    password: password
  - ...

    - ...

I'm wondering if you think this would be a cool feature to add to Ploi.

I could create it as a standalone CLI app that uses the Ploi API, but it'd be nice to have an official support instead, and there are some limitations that are hard to get around (like knowing when a server is done installing). Also, it'd be more efficient on Ploi resources to rung this directly inside Ploi and have access directly to the DB, instead of me doing 100s of API calls.

I'm puting this out here to get a vibe of what others think.



· · Edited

Regarding the docs of the API, there is a param called webhook_url, which is triggered when the server is done installing.

Anyhow, as far as I know, it's only possible to add a website on an already installed server. See here.

So I assume, a standalone CLI app is something to be considered?

I would love to brainstorm with you!

1 total vote
Alexandre Danault
Alexandre Danault

Alexandre Danault

Item author

I dismissed the webhook for now because we can't reliably open an http port from the CLI and hope the webhook from Ploi will be able to reach it (we'd have to get the user's public IP and hope they don't have a firewall) or we'd need an external service to receive the hook, which means money and doesn't make the tool 100% self-sufficient.

For the sites, if the server (specified in the yaml file) doesn't exist, the worker would create it and add the site to it.

A standalone CLI is definitely possible, but I'm going to keep this as a second solution. This would feel much better if integrated directly in Ploi, and also be lighter on Ploi's resources.

I'll be waiting for Dennis' input on this. If he doesn't have time to do it in Ploi (I'd totally understand) then a CLI will be the way.

no votes yet



I spoke with Dennis about this item. Unfortunately, there is currently no time to implement this within in the near future.

I suggested creating a CLI for now, which seems like the most practical option. Plus, having a CLI would be handy regardless. I'm currently waiting for approval. I keep you posted!

Feel free to reachout to me if you want to brainstorm :)

no votes yet
Alexandre Danault

Alexandre Danault

Item author
· · Edited

Hi Stan !

Thanks for reaching out to Dennis, I appreciate getting an official response, and I totally understand that time can be rare.

I have other projects for now but I'll look into it in the future. If you want to keep contact, ping me at and I'll share my progress and questions/ideas with you, we could even collaborate.

Thanks !

1 total vote



We just forked the original CLI package from Felix here:

Stan is now also maintainer on that to work on it! 💙

no votes yet
You may use @ to mention someone.

IDEA for better IaC / DevOps / GitOps: "Ploifile"

3 total votes
Julius Kiekbusch Stan Alexandre Danault
  • Dennis moved item to board Under review

    1 week ago
  • Alexandre Danault moved item to project Server Level Requests

    2 weeks ago
  • Alexandre Danault created the item

    2 weeks ago