Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory name needs to be named "docker" #214

Closed
edevosc2c opened this issue Aug 23, 2023 · 12 comments · Fixed by #268
Closed

Directory name needs to be named "docker" #214

edevosc2c opened this issue Aug 23, 2023 · 12 comments · Fixed by #268
Labels

Comments

@edevosc2c
Copy link
Member

The directory name needs to be named docker and not something else. Or we will have issues for the security proxy routing.

Probably related to @docker: https://github.com/georchestra/docker/blob/master/docker-compose.override.yml#L43

Possible solutions:

  • Find a way to make this work whatever the directory name
  • Big warning in the README for the directory name.
@edevosc2c edevosc2c added the bug label Aug 23, 2023
@fvanderbiest
Copy link
Member

Yes, indeed, excellent finding !
A fix here would be more than welcome.

@jeanpommier
Copy link
Member

I believe that explcitly setting the project's name to docker (docker compose -p docker up) would work. Which means we can also change it to whatever we want, provided we declare the corresponding project's name

@arnaud-morvan
Copy link
Contributor

arnaud-morvan commented Aug 1, 2024

There are multiple way to set the project name: https://docs.docker.com/compose/project-name/

I'm used to add a .env file:

COMPOSE_PROJECT_NAME=georchestra

No need to set it on command line on each call.

And it could be possible to use ${COMPOSE_PROJECT_NAME} where required, for example in

- "traefik.http.routers.traefik.middlewares=traefik-strip@docker"

@edevosc2c
Copy link
Member Author

@arnaud-morvan you mean that by setting COMPOSE_PROJECT_NAME=docker in the .env file, the problem would be solved?

@arnaud-morvan
Copy link
Contributor

arnaud-morvan commented Aug 1, 2024

If I understood correctly, pretty sure yes, it will resolve this issue.

BTW geochestra or georchestra-dev would be more meaningful than docker in this case.

@edevosc2c
Copy link
Member Author

We can't alter the docker compose name, otherwise an existing install will lose all the volumes, as the volumes names are based on the docker compose project name.

@arnaud-morvan
Copy link
Contributor

Yes, so be careful that when upgrading some customer projects, if might change compose project name.

@arnaud-morvan
Copy link
Contributor

arnaud-morvan commented Aug 1, 2024

I may miss something :

  • it seems not a big issue to loose some volumes in dev on such change
  • but it could be a bigger issue to change volumes names in prod (but thoses volumes should be mounted host folders in case of docker compose) take https://github.com/camptocamp/georchestra-stdizier-docker as an example, the folder should be named georchestra-stdizier-docker.

We might need to provide some communication about such change.

Is it possible to not apply this file in customers upgrades ?

Available for discussion until this friday evening before my holidays.

@edevosc2c
Copy link
Member Author

Would rather keep the docker compose project name as "docker" in order to have less friction to the existing users.
It's not like it's going to matter a lot. If one is not happy with the docker compose project name, he can change it.

For the moment, I'm not going to alter this behavior this August. We may reconsider this improvement later in the year.

@fvanderbiest
Copy link
Member

  • it seems not a big issue to loose some volumes in dev on such change

Agreed.

As such, this repository is not production-ready, and does not have a proper release cycle, hence we are allowed to break things.

@arnaud-morvan
Copy link
Contributor

Yes but be careful that some production repositories are forks of this ones, subjects to merge on upgrades.

As I said, in most cases those volumes might be overridden using host folders for production, for those I know about.

@superbully
Copy link

hello.
I have been testing for the problem with the "docker" folder name and I have not been able to get it to work by changing the project name to something different than the default name "docker".
Any idea how to make it work by changing the name of the folder "docker" to another name or by setting the project name different from "docker" ?
thank you all very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment