Can the hobby/pay as you go level support the websockets needed for OpenAI Realtime Twilio streams? If so, What are the ideal port settings for fly.io?
I’m using Node with fastify on an implementation built from this base:
It works splendidly on my PC. It works ‘mostly’ on Railway with some occasional drops. , but I suspect there are some restrictions there for websockets. I’ve seen good things about websockets support at fly.io, but the same code here doesn’t seem to use the websockets with the setup that I’ve tried. (below). Advice?
# Use a base image with a newer GLIBC version, like Debian Bullseye
FROM node:22-bullseye-slim
# Set working directory
WORKDIR /app
# Copy package files
COPY package.json package-lock.json ./
# Install dependencies with npm 10.9.2 (already included in node:22)
RUN npm ci
# Copy the rest of the app
COPY . .
# Set environment to production
ENV NODE_ENV=production
# Expose the port Fly.io typically uses (8080), though the app will use PORT env variable
EXPOSE 8080
# Start the app
CMD ["npm", "start"]