this post was submitted on 08 Aug 2024
12 points (92.9% liked)

Python

7446 readers
10 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

πŸ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
πŸ’“ Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS
 

Hi,

I use gunicorn in my venv

I have quite few venv that run gunicorn.

I would like to reuse gunicorn for other venv

I launch my web application like this

#PWD = venv dir
source ./bin/activate
gunicorn A_WebApp:app
#A_WebApp is my python file A_WebApp.py

I supposes that gunicorn is a shell program ? if yes I should use $PATH ?
or gunicorn is a Python program only ? and then what I should do to use gunicorn in another venv ?

Thanks.

you are viewing a single comment's thread
view the rest of the comments
[–] fraksken 3 points 1 year ago* (last edited 1 year ago) (5 children)

It's possible to make the venv portable, versionize it, archive it and deploy at boot the latest version. It's architecture dependent though, so if you deploy on multiple archs, you will need to build for each.

Edit: gunicorn is part of the venv. All you need to do after deploying gunicorn is activating the venv and running your server.

You can also have the archive tun through several vulnerability checkers.

[–] SpongeB0B@programming.dev 1 points 1 year ago* (last edited 1 year ago) (4 children)

I don't want to make the venv portable...
I want to use the gunicorn that is installed in one venv accessible to other venv

[–] rglullis@communick.news 2 points 1 year ago

Why? How many kilobytes of disk space are you going to save from that?

load more comments (3 replies)
load more comments (3 replies)