I have a medium sized web application. A mobile single page application. Build with VUE3 and vite. It runs perfectly local. But when I deploy it to a fly container I cannot connect to it.
Obviously this is a port mapping issue. Here is what I already tried. And none worked so far.
- configured
server.port = 8080invite.config.js - confugured
host: trueinvite.config.jsto allow access from any IP (localhost, 127.0.0.1 or any other intranet IP) - checked configuration in
fly.toml - Read all the (very nice) Fly troubleshout documentation
- Deleted my containers and restarted them from scratch
- … no luck so far.
Here are the details:
My VUE app running locally with the command npx vite:
VITE v7.1.7 ready in 262 ms
➜ Local: http://localhost:8080/
➜ Network: http://192.168.178.134:8080/
➜ press h + enter to show help
Works like a charm locally. Mind: Here I have no HTTPS.
vite.config.js
Vite.dev is VUE’s builder, packager and server/runner.
export default defineConfig({
server: {
host: true, // listen on all adresses, incl. LAN and public adresses
port: 8080,
},
plugins: [
vue(),
]
})
fly launch
Then I build the app with fly launch. This creates the following
Dockerfile
FROM debian:bullseye as builder
ARG NODE_VERSION=22.14.0
RUN apt-get update; apt install -y curl python-is-python3 pkg-config build-essential
RUN curl https://get.volta.sh | bash
ENV VOLTA_HOME /root/.volta
ENV PATH /root/.volta/bin:$PATH
RUN volta install node@${NODE_VERSION}
RUN mkdir /app
WORKDIR /app
ENV NODE_ENV production
COPY . .
RUN npm install && npm run build
####
FROM debian:bullseye
LABEL fly_launch_runtime="nodejs"
COPY --from=builder /root/.volta /root/.volta
COPY --from=builder /app /app
WORKDIR /app
ENV NODE_ENV production
ENV PATH /root/.volta/bin:$PATH
CMD [ "npx", "vite", "--host", "0.0.0.0"]
I specifically added the --host option to vite also on the command line. To make sure my app uses this port.
Here is an excerpt from the Fly virtual machine log:
[info][ 70.321998] reboot: Restarting system
[info]Out of memory: Killed process
[info]2025-10-10T11:27:17.117593392 [01K76XXR002X5GRTWEMS4J7CS8:main] Running Firecracker v1.12.1
[info]2025-10-10T11:27:17.117785068 [01K76XXR002X5GRTWEMS4J7CS8:main] Listening on API socket ("/fc.sock").
[info] INFO Starting init (commit: fedadb2e)...
[info] INFO Preparing to run: `npx vite --host 0.0.0.0` as root
[info] INFO [fly api proxy] listening at /.fly/api
[info]Machine started in 2.783s
[info]2025/10/10 11:27:21 INFO SSH listening listen_address=[fdaa:1:b0e4:a7b:5a6:fffd:28ad:2]:22
[info] VITE v7.1.7 ready in 11995 ms
[info] ➜ Local: http://localhost:8080/
[info] ➜ Network: http://172.19.11.122:8080/
[info] ➜ Network: http://172.19.11.123:8080/
Now it gets more intersting. Output of fly deploy
=> => pushing manifest for registry.fly.io/liquido-frontend-fly:deployment-01K76XWBJQFDY4T8C4PBCZEKNA@sha256:04ce3fbdfe47cbb7f39ad02546fe7855b956b62f61d50c523a66a46c837b7a73 0.0s
--> Build Summary: ()
--> Building image done
image: registry.fly.io/liquido-frontend-fly:deployment-01K76XWBJQFDY4T8C4PBCZEKNA
image size: 169 MB
Watch your deployment at https://fly.io/apps/liquido-frontend-fly/monitoring
-------
Updating existing machines in 'liquido-frontend-fly' with rolling strategy
WARNING The app is not listening on the expected address and will not be reachable by fly-proxy.
You can fix this by configuring your app to listen on the following addresses:
- 0.0.0.0:8080d lease for 6e827210a70ee8
Found these processes inside the machine with open listening sockets:
PROCESS | ADDRESSES
-----------------*---------------------------------------
/.fly/hallpass | [fdaa:1:b0e4:a7b:5a6:fffd:28ad:2]:22
-------
✔ [1/2] Cleared lease for 4d894916a64238
✔ [2/2] Cleared lease for 6e827210a70ee8
-------
Checking DNS configuration for liquido-frontend-fly.fly.dev
Visit your newly deployed app at https://liquido-frontend-fly.fly.dev/
Something is going on inside the container. Why is my app not listening on port 8080? According to the server logs it should.
I can SSH into the container with fly ssh console. But that base image is so limited. It’s hard to debug anything in there. No ps, no lsof, no netstat. I also cant install these network debuggin tools.
https://liquido-frontend-fly.fly.dev/ does not load ![]()
Questions
- HTTPs outside (https://liquido-frontend-fly.fly.dev/) and the fly proxy forwards that without TLS/HTTPS to the internal port 8080 => is that correct?
- How can I test more if my application is working correctly inside the container? Or on it? Can I call my app from another Fly container? Kinda internally intranet. Do rule out DNS issues.
- Any configuration I missed?
Any further ideas?