Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fly.io instructions on listmonk docs? #984

Closed
paulrudy opened this issue Oct 15, 2022 · 6 comments
Closed

Add Fly.io instructions on listmonk docs? #984

paulrudy opened this issue Oct 15, 2022 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@paulrudy
Copy link

I've created a repo with instructions for deploying listmonk on Fly.io. Perhaps you'd like to include it in the docs? If so, I could create a PR.

@knadh
Copy link
Owner

knadh commented Oct 17, 2022

Thanks. We can add a link to the tutorial under the 3rd party hosting section here https://listmonk.app/docs/installation/#3rd-party-hosting

@knadh knadh added the documentation Improvements or additions to documentation label Oct 17, 2022
@knadh knadh closed this as completed Oct 22, 2022
@paulrudy
Copy link
Author

I created a PR

@salahmak
Copy link

Hi @paulrudy I hope you're doing great. I'm having some issues with the steps you have provided in your repo and since it is archives I couldn't find any other way to contact you. So can you please check if it is up to date?

The problem I'm having is that when I do flyctl deploy I get these logs:

Updating existing machines in 'APP NAME' with rolling strategy
  Machine e286715c6e3478 [app] has state: started
  [1/1] Checking that <APP_CODE> [app] is up and running
Smoke checks for <APP_CODE> failed: the app appears to be crashing
Check its logs: here's the last lines below, or run 'fly logs -i <APP_CODE>':
  Configuring firecracker
  [    0.034743] PCI: Fatal: No config space access function found
   INFO Starting init (commit: b437b5b)...
   INFO Mounting /dev/vdb at /data w/ uid: 0, gid: 0 and chmod 0755
   INFO Resized /data to 1069547520 bytes
   INFO Preparing to run: `/bin/sh -c rm -rf /data/listmonk/static;   mkdir -p /data/listmonk;   cp -r /tmp/static /data/listmonk;   ./listmonk --install --idempotent --yes > server.log 2>&1 &&   ./listmonk --upgrade --yes > server.log 2>&1 &&  ./listmonk --static-dir=/data/listmonk/static > server.log 2>&1` as root
   INFO [fly api proxy] listening at /.fly/api
  2023/08/27 01:47:42 listening on [ADDRESS]:22 (DNS: [fdaa::3]:53)
   INFO Main child exited normally with code: 1
   INFO Starting clean up.
   INFO Umounting /dev/vdb from /data
   WARN hallpass exited, pid: 264, status: signal: 15 (SIGTERM)
  2023/08/27 01:47:43 listening on [ADDRESS]:22 (DNS: [fdaa::3]:53)
  [    2.266882] reboot: Restarting system
  machine did not have a restart policy, defaulting to restart
  [    0.036945] PCI: Fatal: No config space access function found
   INFO Starting init (commit: b437b5b)...
   INFO Mounting /dev/vdb at /data w/ uid: 0, gid: 0 and chmod 0755
   INFO Resized /data to 1069547520 bytes
   INFO Preparing to run: `/bin/sh -c rm -rf /data/listmonk/static;   mkdir -p /data/listmonk;   cp -r /tmp/static /data/listmonk;   ./listmonk --install --idempotent --yes > server.log 2>&1 &&   ./listmonk --upgrade --yes > server.log 2>&1 &&  ./listmonk --static-dir=/data/listmonk/static > server.log 2>&1` as root
   INFO [fly api proxy] listening at /.fly/api
  2023/08/27 01:47:45 listening on [ADDRESS]:22 (DNS: [fdaa::3]:53)
   INFO Main child exited normally with code: 1
   INFO Starting clean up.
   INFO Umounting /dev/vdb from /data
   WARN hallpass exited, pid: 264, status: signal: 15 (SIGTERM)
  2023/08/27 01:47:46 listening on [ADDRESS]:22 (DNS: [fdaa::3]:53)
Error: smoke checks for <APP_CODE> failed: the app appears to be crashing

When I check the logs of the app, I find that it keep restarting

@paulrudy
Copy link
Author

paulrudy commented Aug 27, 2023

Hi @salahmak, I haven't used listmonk for awhile, so although I replicated the problem you're having, I'm afraid I don't have any insight into what's going on. Something must have changed since I archived the repository, but I don't know if it is something with listmonk, or fly.io, or both.

I think your best bet would be to ask for support on fly.io's discussion site, or ask around here. Sorry I can't help

@salahmak
Copy link

Thanks for the reply @paulrudy and for putting effort into reproducing the problem, at least I know that I did the steps correctly.

I'll ask more and see.

@salim-b
Copy link
Contributor

salim-b commented Oct 12, 2023

You can find a fully working setup in this GitLab repository.

To summarize:

  • Set sensitive stuff like passwords as Fly secrets (flyctl secrets set VAR=VALUE).
  • Use the deploy.release_command setting to run DB initialization and migrations.
  • Create a persistent volume (flyctl volume create listmonk_uploads) to store uploads and set the necessary [[mounts]] and [[statics]] entries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants