I am experimenting with Render.
I have dockerized the quickstart express-hello-world server, and have created a web service to deploy that. It does the docker build correctly, and launches the server correctly on docker port 3001. I assume Render magically maps that to port 443, but when I go to the xxx.onrender.com link I get a 404 error. Not sure what I am doing wrong. Below is my Dockerfile.
FROM node:18-alpine3.16 RUN apk add --no-cache openvpn # So render can identify the port to map to ENV PORT=3001 # Set working directory and copy source there WORKDIR /home/node COPY ./ /home/node USER node # Build the app RUN yarn # Run the app CMD [ "npm", "start" ]
and this is the tail end of the log:
Jun 20 02:18:45 PM > firstname.lastname@example.org start Jun 20 02:18:45 PM > node app.js Jun 20 02:18:45 PM Jun 20 02:18:48 PM Example app listening on port 3001!
I came back after an hour and the app was spun down (on free level). I hit the link again, it spun up and this time it worked, once. But when I reloaded the page or tried going from the Dashboard link again, I got the 404 again.
So it seems like it can work, but the “magic render glue” is not stable?