R
Railway15mo ago
candide

Listmonk; Static Files

Not sure why my post was deleted, but here it is again: Hello, I've deployed Listmonk on Railway, and noticed that Listmonk instances deployed on docker are able to create static file directories by editing the docker-compose.yml and adding a --static-dir argument. The user then needs to place the static files right next to the docker-compose.yml file (see guide: https://yasoob.me/posts/setting-up-listmonk-opensource-newsletter-mailing/#custom-static-files and docs: https://listmonk.app/docs/templating/#system-templates). My question is: how could this be done with Railway and the GitHub Dockerfile? Should the files be added to GitHub? ID: ee57e574-6090-431d-a65c-1d21de37f2a4
Setting up listmonk, an open-source newsletter & mailing list manag...
Hi everyone! 👋 I have been using Mailchimp for my mailing list for a while and even though it is great, it is super expensive. I have 5000+ people in my list and that puts me in their $78 plan. I send the newsletter very rarely and don’t really earn anything from the mailing list so it was really hard for me to justify the $78. I had recently in...
8 Replies
Percy
Percy15mo ago
Project ID: ee57e574-6090-431d-a65c-1d21de37f2a4
Brody
Brody15mo ago
the blog post you linked sums it up pretty nicely for me, so ill try condense the information. - copy the static directory into your own listmonk repo - make the changes to the contents of that static directory as you see fit - add a COPY static /listmonk/static line before the COPY config.sh ./config.sh line to your Dockerfile - overwrite the default CMD command by appending CMD ["./listmonk", "--static-dir=/listmonk/static"] to your Dockerfile keep in mind this is just how i am interpreting the instructions given by the blog, I may have gotten something wrong, but at minimum this should give you a good starting point. as for the deleted post, i have no clue, sorry
candide
candideOP15mo ago
Ok, I'll give that a try and report back. Thanks @brody192
Brody
Brody15mo ago
no problem!
candide
candideOP14mo ago
Hi @Brody! I'm not sure how to add this part:
overwrite the default CMD command by appending CMD ["./listmonk", "--static-dir=/listmonk/static"] to your Dockerfile
My Dockerfile looks like this:
FROM listmonk/listmonk:latest
ARG PORT ADMIN_PASSWORD ADMIN_USERNAME PGDATABASE PGHOST PGPASSWORD PGPORT PGUSER
COPY static /listmonk/static
COPY config.sh ./config.sh
RUN chmod +x ./config.sh && ./config.sh
RUN ./listmonk --idempotent --yes --upgrade || ./listmonk --install --yes --upgrade
FROM listmonk/listmonk:latest
ARG PORT ADMIN_PASSWORD ADMIN_USERNAME PGDATABASE PGHOST PGPASSWORD PGPORT PGUSER
COPY static /listmonk/static
COPY config.sh ./config.sh
RUN chmod +x ./config.sh && ./config.sh
RUN ./listmonk --idempotent --yes --upgrade || ./listmonk --install --yes --upgrade
Brody
Brody14mo ago
add another like to your dockerfile and put the CMD command on that line
candide
candideOP14mo ago
WOW, it works! I've been stuck on this for a year now, and thought Railway wasn't capable of doing this. You're amazing, Brody!
Brody
Brody14mo ago
railway is capable of doing more things you could ever imagine 😉 and tbh since I've never touched listmonk ever, I'm very surprised that I was able to give you instructions that worked on the first try thank you for the train, very much appreciated ❤️
Want results from more Discord servers?
Add your server