alfredbaudisch / pardall_markdown

Reactive publishing framework, filesystem-based with support for Markdown, nested hierarchies, and instant content rebuilding. Written in Elixir.
Apache License 2.0
115 stars 7 forks source link

Deployment file_system dependency #61

Open jwright opened 2 years ago

jwright commented 2 years ago

I am trying to deploy an app with Pardall Markdown as a dependency to Gigalixir but the application does not start because it does not have inotify-tools installed, which is a dependency to file_system.

Has anyone successfully deployed this to either Heroku or Gigalixir? I know the use of buildpacks can be used but so far, I have not been able to get it to work.

alfredbaudisch commented 2 years ago

Good point @jwright. I have to investigate how can this be worked around Heroku et all.

alfredbaudisch commented 2 years ago

It actually may not be possible, because Pardall Markdown relies on inotify as the core feature. I'll keep investigating, please update me if you find something else.

jwright commented 2 years ago

@alfredbaudisch Thanks for the reply. I was researching a lot and I have not been able to find much.

I did find the Heroku Buildpack Apt which may be able to work using an Aptfile with inotify-tools.

I tried that but not on Heroku yet as I am hosted on Gigalixir. It did not work but that may be unrelated to the buildpack for a regular mix project. I am using Distillery to deploy my app, so that is another issue.

stepchud commented 1 year ago

I've gotten Pardall Markdown working on Heroku, Fly.io and in GitHub Actions CI now. It's kind of annoying that you have to install the dependency in every VM that runs the app. It would be really nice if you could somehow disable the filesystem watcher via ENV, since I don't really use it in production deploys. I realize this would remove a lot of the value Pardall provides but the system dependency is a lot to maintain.

  1. The Aptfile approach works on Heroku.
  2. Fly.io uses Docker containers for deployment and it's a matter of adding inotify-tools to the right place in your Dockerfile. I use a debian image (w/ apt-get command) and the specific RUN command looks like this:
    RUN apt-get install -y inotify-tools \
    && apt-get clean && rm -f /var/lib/apt/lists/*_*
  3. For GitHub Actions, my first step in the Workflow looks like:
    steps:
    # Step: Install OS dependencies
    - name: apt-get deps
      run: sudo apt-get install inotify-tools

    Otherwise, it would be really nice if the tool removed this dependency and handled filesystem observation without any external dependencies. I honestly have no idea how much work that would require but if the maintainer is interested I might be able to look into this option for @alfredbaudisch.