commercialhaskell / stack

The Haskell Tool Stack
http://haskellstack.org
BSD 3-Clause "New" or "Revised" License
3.98k stars 845 forks source link

Make it easy to run stack on an intranet #2567

Open philipcraig opened 8 years ago

philipcraig commented 8 years ago

This is an enhancement request. The request is to make it easy to run stack on machines that are cut off behind an intranet, via a trusted repository on the intranet side.

The use-case is as follows. Inside a firewall boundary, there are many machines that need stack setups (e.g. build agent servers and personal workstations). There is a policy that such machines can never access the internet, not even via http(s) proxies.

There can be trusted repositories inside the intranet, with curated access to save down selected internet files.

The request is to make it trivial for a stack setup to be told about the trusted repos. Current efforts involve finding and rewriting all urls used throughout the stack setup process. These include github, stackage and hackage.

Instead, have more relative urls, and a short list of top-level sites that stack can access. Then, when wanting to run stack inside an intranet, only a couple of top-level sites have to be renamed in the stack configuration to be intranet sites.

A secondary request would be code to easily set up such mirrors inside an intranet.

Cc: @ndmitchell

mgsloan commented 7 years ago

Another usecase would be for long airplane flights. See also https://github.com/commercialhaskell/stack/issues/1594

This would certainly be an appreciated enhancement! I've marked it as "awaiting PR"

AleXoundOS commented 7 years ago

It's similar to Offline builds, but with a local stackage server as I understood the original idea correctly. Yes, there is a great need for such feature. Without this you cannot develop offline unless you know all the packages beforehand to download before getting offline.

And questionable solutions using docker for using stack offline are not actually solutions to this problem.

decentral1se commented 7 years ago

Work related to this going on in https://github.com/commercialhaskell/stack/issues/2982#issuecomment-280122048.