Question

How do I set up an App worker to run a LUA script?

Currently I have a droplet with a node web server and LUA installed. I also have an APP which runs a second server. Right now the web server executes the LUA app from the shell.

I’d like to move the LUA thing to the second server, and it seems like making it a worker would be the best bet.

Can anyone explain what the process for doing that is? Do I create it from Github or Docker Hub?

I know how to create the worker, and that I need to make it a “Dockerfile build”, but i have no idea how to use that or make it work or how I would send requests there or anything. Would I need to build a LUA web server to receive requests?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

i gave up because its too hard to setup

Jon Friesen
DigitalOcean Employee
DigitalOcean Employee badge
November 1, 2022

👋 @skeddtemp

Great question! Workers would be a good fit if you had a LUA app that continuously polled for “work” to do. So if that is looking in the DB for work or reaching out to the node server for more work. The important thing to note here is that workers are going out and finding the work, they cannot have ports exposed, so creating a web server won’t work.

If creating a web server IS what you’re interested in, then you may want to consider an internal service component. This is a service without any publicly accessible ports but internally accessible ones that can be accessed by other app components (like the node server).

As far as how this is created, LUA isn’t supported by App Platform buildpacks, so you’d have to create a dockerfile that has the right depdencies to run lua.

Hope this helps!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.