Skip to content

Fix development environment with containers and backports custom public URLs#424

Open
Trim wants to merge 5 commits into
linuxfrorg:mainfrom
Trim:container-main
Open

Fix development environment with containers and backports custom public URLs#424
Trim wants to merge 5 commits into
linuxfrorg:mainfrom
Trim:container-main

Conversation

@Trim
Copy link
Copy Markdown
Member

@Trim Trim commented May 31, 2026

See: https://linuxfr.org/suivi/mettre-a-jour-le-docker-compose-donne-avec-le-code-source

For the moment this is a Draft, I have issues with the image service.

Trim added 5 commits May 31, 2026 10:56
The easiest was to update the Debian base image to bullseye as previous
Debian releases have been archived.

This commit backports too the new deployment file structure from the
rails7 branch. It uses more generic terms like `Containerfile` and
`compose.yaml` instead of docker specific names like `Dockerfile` and
`docker-compose.yaml`. You should be able to use `podman` dans `docker`
to run the linuxfr stack.
…efault

This commit introduces two new global constants MY_PUBLIC_URL and
IMG_PUBLIC_URL which should be used now to build URLs.

For alpha and production Ruby environments, they are fixed with their real
values directly in the `config/environments/*.rb` files.

For the development Ruby environment, they are both defined by default to
`http://dlfp.lo`. You can customize either by updating the
`config/environments/development.rb` file or by setting the
*process* environment variables `DOMAIN`, `DOMAIN_HTTP_PORT`, `IMAGE_DOMAIN`
and `IMAGE_DOMAIN_HTTP_PORT`.

For containers, you can set these variables in the `deployment/default.env`
file. For containers the default IMG_DOMAIN is set to `img.dlfp.lo`.
Create the cache folder with permissions for ${UID} so docker/podman
now which rights to set when it creates the`cache-img` volume for
this path.
@Trim Trim marked this pull request as ready for review May 31, 2026 19:58
@Trim Trim requested review from Oumph and echarp May 31, 2026 20:00
@Trim
Copy link
Copy Markdown
Member Author

Trim commented May 31, 2026

La mise à jour de l'utilisation des variables d’environnement "MY_PUBLIC_URL" et "IMG_PUBLIC_URL" pourrait perturber le prochain déploiement sur alpha et production, ça serait pas mal si vous pouvez faire une revue.

Je me chargerai ensuite de résoudre les conflits avec la branche Rails 8 (aka rails7).

@gbetous
Copy link
Copy Markdown

gbetous commented Jun 1, 2026

Pas de soucis avec Docker sous Arch, le site est bien accessible sur http://dlfp.lo (en suivant la doc sur Container.md)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants