Comments (7)
it's a sensible thing to do if by default we want a working service limiting options and arguments when running in
docker
from fastify-cli.
I do not think you are running your server using fastify-cli. Are you using this module at all?
The snippet above is not from this module.
from fastify-cli.
I think something is broken here.
fastify.listen(process.env.PORT || 3000, '0.0.0.0', function (err, address) {
if (err) {
fastify.log.error(err)
process.exit(1)
}
fastify.log.info(`server listening on ${address}`)
});
When running on regular Node I get Server listening on http://0.0.0.0:3000
as expected.
But when running in Docker I get Server listening at http://127.0.0.1:8080
so the server cannot be reached.
Wasn't this PR by @mcollina supposed to add 0.0.0.0
by default when running in Docker?
It seems now it's actually overwriting the address and using 127.0.0.1
instead.
Or maybe I'm missing something...
from fastify-cli.
I would do this by default if bundled within docker.
from fastify-cli.
Closed in #58
from fastify-cli.
Damn'it I'm too late. Just ran into it when using docker. Would have been easier if I had seen this earlier.
from fastify-cli.
Ooops sorry @mcollina I totally missed this wasn't the main Fastify repo.
from fastify-cli.
Related Issues (20)
- Generated project doesn't work out of the box with --esm --lang=ts HOT 2
- Need better `eject`
- Can't add schema to route HOT 1
- Route URL case sensitivity HOT 20
- Generate plugin nitpicks to work out of the box
- Core plugin installation utility HOT 4
- package.json file already exists in target directory HOT 2
- c8 dependency is not added with fastify generate project_name --lang=ts HOT 1
- How to configure project to run as https in development mode HOT 2
- How to run a fastify server in production HOT 2
- Watcher is not working on builders
- Does Platformatic Replace fastify-cli ? HOT 1
- Dependency update for v5
- with 'nom run start' error: Missing the required file parameter shows up
- Increasing Code coverage HOT 2
- Make the tool more interactive HOT 1
- How to load env.development? HOT 1
- Any Interest in Adding TS and ESM support to the generate-plugin option?
- Permanent reboot with fastify/vite HOT 4
- Typescript Fastify app generated with cli has error when running `npm run test`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastify-cli.