Giter VIP home page Giter VIP logo

Comments (7)

ninjatux avatar ninjatux commented on September 8, 2024 3

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.

mcollina avatar mcollina commented on September 8, 2024 2

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.

PierBover avatar PierBover commented on September 8, 2024 1

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?

#58

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.

mcollina avatar mcollina commented on September 8, 2024

I would do this by default if bundled within docker.

from fastify-cli.

delvedor avatar delvedor commented on September 8, 2024

Closed in #58

from fastify-cli.

pyrossh avatar pyrossh commented on September 8, 2024

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.

PierBover avatar PierBover commented on September 8, 2024

Ooops sorry @mcollina I totally missed this wasn't the main Fastify repo.

from fastify-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.