MAX_PRIVATE_PROJECTS_PER_USER for Docker installation

Hi there!

For clarification, I’m talking about

# PUBLIC OR PRIVATE NUMBER OF PROJECT PER USER
MAX_PRIVATE_PROJECTS_PER_USER = 1 # None == no limit
MAX_PUBLIC_PROJECTS_PER_USER = 0 # None == no limit
MAX_MEMBERSHIPS_PRIVATE_PROJECTS = None # None == no limit
MAX_MEMBERSHIPS_PUBLIC_PROJECTS = None # None == no limit

which can be found in taiga-back/settings/config.py.prod.example.

I’m having trouble restricting project creation for a Docker installation. I tried exposing the responsible variables via .env and reading them in through docker-compose.yml/docker-compose-inits.yml but without any effect.

Then again, skimming the code, it appears to me that these variables can only be set through a dedicated config.py. Can somebody confirm this? That would be a real pity.

Would that then mean that I’d have to dump the current .env-based installation and switch to a configuration via the Python configuration file?

It seems I can’t run both together and the corresponding documentation seems to confirm this.

hi @maryisdead welcome to our community.

I can see two options:

  1. change config.py in taiga-back/docker.
    Add those variables in the file, reading from os.getenv (check the file and follow other examples).
    Then build your own taiga docker image and use it in your docker-compose.yml

  2. use the advanced configuration and map a config.py file with all the configurations you want/need

Cheers!

Alright, thanks.

What’s the best place to suggest having those four variables exposed in .env as well?

if you’re using option 1, you should write those variables in the .env file so they get to the docker process and sent to the container.

if you’re using option 2, you should write those variables in the config.py file mapped into the container.

Cheers!

This is not working. It’s actually what this topic is about. :slight_smile: I’ll open a ticket.

Thank you anyways.

hi @maryisdead

which part is not working? there are some parts involved:

  • can you change the taiga-back/docker/config.py file?
  • can you rebuild the image without errors?
  • did you change the docker-compose.yml to use the new image?
  • can you get the containers up & running? can you navigate to this taiga locally?
  • can you check the environment variables inside a running container?
  • are those variables in the environment inside the container?

cheers!