Giter VIP home page Giter VIP logo

Comments (5)

kasparsd avatar kasparsd commented on June 3, 2024 1

@nandotess One could use different URLs for each project for simplicity and developer-experience but you would always need to do npm run stop-all before starting the other project.

from vip-site-template.

kasparsd avatar kasparsd commented on June 3, 2024

@nandotess DEV_URL is just a way to change the URL if the project needs it. For example, set it to client-name.devgo.vip. It would be the responsibly of the developer to ensure that the URL actually resolves to the 127.0.0.1 IP.

You would also need to restart the Docker containers for the changes to apply since that environment variable is used by docker-compose when booting the containers -- see all the environment variable references in https://github.com/xwp/vip-go-site/blob/fe7def340011c9c84d32f5fa102481ddd384dc20/docker-compose.yml

We also bundle a DNS container which automatically knows where to route DEV_URL as long as your machine is configured to use 127.0.0.1 as one of the DNS servers. Previously it has proven to be challenging to add instructions or simple scripts to configure the custom DNS on all operating systems so we decided to default to a top-level domain that resolves to 127.0.0.1.

from vip-site-template.

nandotess avatar nandotess commented on June 3, 2024

@nandotess DEV_URL is just a way to change the URL if the project needs it.

@kasparsd so, this is what I was trying to do. I was trying to customize the URL for the project so I can have more than one VIP project mounted/running at the same time.

I did change the variable before anything (right after cloning the project), and at the end of all the process the URL was not working on the browser (Instead the local.devgo.vip continue to respond via NGINX proxy container).

This might be related to the issue #116, since I was testing all this together. Not quite sure.

from vip-site-template.

kasparsd avatar kasparsd commented on June 3, 2024

I was trying to customize the URL for the project so I can have more than one VIP project mounted/running at the same time.

Thanks for the context -- really useful!

This kind of setup would be really hard because of all nginx-proxy containers trying to attach to port 80 on the host machine. This is "a limitation" of Docker when compared to something like Vagrant which can create a proper network interface on all operating systems.

Since local.devgo.vip points to 127.0.0.1, it would always connect to any HTTP server running on your computer at port 80. Did you have any of the other containers running at the same time?

One possible solution is to adjust the exposed port number of nginx-proxy for one of the projects (to something other than 80) but that would require using that port number in the site URL which limits some of the multisite capabilities, if I'm not mistaken.

from vip-site-template.

nandotess avatar nandotess commented on June 3, 2024

Thanks, @kasparsd, that is a great explanation! So, if in this case (with Docker) I can't have more than one site running simultaneously, there is no reason I would change the URL. So that is fine and you can close this issue/ticket in case we don't want/need to customize the URL.

from vip-site-template.

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.