DEV Community

loading...

Discussion on: Productive and simple way to deploy Dockerized applications

Collapse
angelxmoreno profile image
Angel S. Moreno

How does Qovery know to map port 3000 to 80?

Collapse
angelxmoreno profile image
Angel S. Moreno • Edited

Interestingly enough, found this via experimentation:

Using the following docker file when visiting the app url (main-xuser-a-hjiw7xpmxcc2s76x-gtw....), I get
Server running at https://main-xuser-a-hjiw7xpmxcc2s76x-gtw.qovery.io:80

# This stage installs our modules
FROM mhart/alpine-node:14

ARG QOVERY_ROUTER_MAIN_XUSER_API_APP_URL
ENV BASE_HOST=$QOVERY_ROUTER_MAIN_XUSER_API_APP_URL
ENV PORT=80

WORKDIR /app
COPY . .
RUN yarn install
RUN yarn build

EXPOSE 80

CMD ["yarn", "start"]
Enter fullscreen mode Exit fullscreen mode

However, using the below Dockerfile, when i visit the same url I get
Server running at https://main-xuser-a-hjiw7xpmxcc2s76x-gtw.qovery.io:8080

# This stage installs our modules
FROM mhart/alpine-node:14

ARG QOVERY_ROUTER_MAIN_XUSER_API_APP_URL
ENV BASE_HOST=$QOVERY_ROUTER_MAIN_XUSER_API_APP_URL
ENV PORT=8080

WORKDIR /app
COPY . .
RUN yarn install
RUN yarn build

EXPOSE 8080

CMD ["yarn", "start"]
Enter fullscreen mode Exit fullscreen mode

So far, my experience with Qovery has been that of disbelief of how awesome they claim to be mixed with the awesome realization that they sure as hell ain't lying.

Would love to see more complex examples of getting existing projects up and running using their services.

Collapse
pjeziorowski profile image
Patryk Jeziorowski Author

Hey @angelxmoreno , the trick with port mapping - we try to figure it out based on your Dockefile (EXPOSE statements). You could also try completely removing the Dockerfile - then we rely on Buildpacks to do all the dirty job.

We plan to release a major update in mid-May - it will make the service incomparably better than what we have now! :)

Feel free to join our Discord (discord.qovery.com) if you need any help or support. Cheers!