Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
778 views
in Technique[技术] by (71.8m points)

deployment - Pip , npm on offline servers

If you are developing Python web services for local network (servers is totally offline from the web) and the only way to add files to the server is through Flash drivers so using pip for Python packages or npm for node packages is such a headache and gets in a lot of dependencies issues and build issues .. so what is the proper way of dealing with such environment so development and deployment would be easier?

question from:https://stackoverflow.com/questions/65541118/pip-npm-on-offline-servers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

there are 2 approaches which you can take:

  1. download all your dependencies locally and ship them to the remote server. this includes all the pip and npm packages. pay attention to the python odejsoperating system versions and architecture.

  2. use docker to create an image, which packs everything. then ship the image to the remote server and finally spin-up a container based on that image.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...