The Open Beauty Facts example in docs/dev/how-to-develop-using-docker.md does not match the current Docker Compose configuration.
There seem to be two separate issues:
-
The guide changes PRODUCT_OPENER_PORT from 80 to 81, but
docker/dev.yml also publishes PRODUCT_OPENER_HOST_PORT, which remains
set to 80 in the copied .env file.
-
The guide sets COMPOSE_PROFILES=obf, but docker compose config --profiles
currently only reports the off profile. postgres and redis-listener
are assigned to that off profile.
-
The default Docker network name is hard-coded as product-opener in
docker-compose.yml. As a result, the OFF and OBF Compose projects join
the same internal network even though they have different
COMPOSE_PROJECT_NAME values. Both projects then register identical
network aliases such as backend, frontend, postgres and memcached,
making service-name resolution ambiguous between the two deployments.
-
The Docker configuration still selects the off MongoDB database for an
OBF flavor. Config2_docker.pm sets:
$mongodb = $producers_platform ? "off-pro" : "off";
and Config_obf.pm reuses that value instead of selecting the obf
database. Therefore, an instance configured with
PRODUCT_OPENER_FLAVOR=openbeautyfacts and
PRODUCT_OPENER_FLAVOR_SHORT=obf still queries MongoDB database off.
The only available Compose profile is off.
postgres and redis-listener are not included with COMPOSE_PROFILES=obf.
The frontend configuration contains both:
published: "81"
published: "80"
Starting OBF alongside OFF therefore still attempts to bind host port 80.
Suggested changes :
- Add PRODUCT_OPENER_HOST_PORT=81 to the documented OBF configuration.
- Clarify whether OBF should keep COMPOSE_PROFILES=off, or add obf to the profiles of services required by every public flavor.
- Consider updating env/env.obf so it also overrides the domain, host port and Minion queue required to run OBF alongside OFF.
- Make the default Product Opener network name configurable or project-scoped, for example:
networks:
default:
name: ${PRODUCT_OPENER_NETWORK:-product-opener}
- Select the MongoDB database from the configured flavor, or introduce an explicit environment variable such as
MONGODB_DATABASE. For example, PRODUCT_OPENER_FLAVOR_SHORT=obf should result in mongodb=obf.
The Open Beauty Facts example in
docs/dev/how-to-develop-using-docker.mddoes not match the current Docker Compose configuration.There seem to be two separate issues:
The guide changes
PRODUCT_OPENER_PORTfrom 80 to 81, butdocker/dev.ymlalso publishesPRODUCT_OPENER_HOST_PORT, which remainsset to 80 in the copied
.envfile.The guide sets
COMPOSE_PROFILES=obf, butdocker compose config --profilescurrently only reports the
offprofile.postgresandredis-listenerare assigned to that
offprofile.The default Docker network name is hard-coded as
product-openerindocker-compose.yml. As a result, the OFF and OBF Compose projects jointhe same internal network even though they have different
COMPOSE_PROJECT_NAMEvalues. Both projects then register identicalnetwork aliases such as
backend,frontend,postgresandmemcached,making service-name resolution ambiguous between the two deployments.
The Docker configuration still selects the
offMongoDB database for anOBF flavor.
Config2_docker.pmsets:and Config_obf.pm reuses that value instead of selecting the obf
database. Therefore, an instance configured with
PRODUCT_OPENER_FLAVOR=openbeautyfacts and
PRODUCT_OPENER_FLAVOR_SHORT=obf still queries MongoDB database off.
The only available Compose profile is off.
postgres and redis-listener are not included with COMPOSE_PROFILES=obf.
The frontend configuration contains both:
published: "81"
published: "80"
Starting OBF alongside OFF therefore still attempts to bind host port 80.
Suggested changes :
MONGODB_DATABASE. For example,PRODUCT_OPENER_FLAVOR_SHORT=obfshould result inmongodb=obf.