Skip to content

Commit

Permalink
max projects config
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Feb 2, 2024
1 parent d161ad6 commit 5c2782a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mpcontribs-api/supervisord/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
deployments = {}

for deployment in os.environ.get("DEPLOYMENTS", "ml:10002").split(","):
name, db, s3, tm, api_port = deployment.split(":")
name, db, s3, tm, max_projects, api_port = deployment.split(":")
portal_port = 8080 + int(api_port) % 10000
deployments[name] = {
"api_port": api_port,
"portal_port": portal_port,
"db": db,
"s3": s3,
"tm": tm.upper()
"tm": tm.upper(),
"max_projects": max_projects if max_projects else 3
}

kwargs = {
Expand Down
1 change: 1 addition & 0 deletions mpcontribs-api/supervisord/supervisord.conf.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ environment=
MPCONTRIBS_API_HOST="{{ mpcontribs_api_host }}:{{ cfg.api_port }}",
MPCONTRIBS_DB_NAME="mpcontribs-{{ cfg.db }}",
TRADEMARK="{{ cfg.tm }}",
MAX_PROJECTS="{{ cfg.max_projects }}",
S3_DOWNLOADS_BUCKET="mpcontribs-downloads-{{ cfg.s3 }}",
S3_ATTACHMENTS_BUCKET="mpcontribs-attachments-{{ cfg.s3 }}",
S3_IMAGES_BUCKET="mpcontribs-images-{{ cfg.s3 }}",
Expand Down

0 comments on commit 5c2782a

Please sign in to comment.