Open darioguarascio opened 1 year ago
Describe the bug
After a build and having Astro running in a containerized way, translation do not work because the build generates:
.... "backend": {"loadPath": "/some/local/directory/public/locales/{{lng}}/{{ns}}.json",} ....
and docker uses mounting point, therefore path mismatch
To Reproduce
run a Astro build with npm run build run npm run preview to have the server being executed in local machine -> in this way, it works
npm run build
npm run preview
use this docker-compose.yml sample to run the same server but within a docker container:
docker-compose.yml
astro: image: node:18 restart: unless-stopped volumes: - ./:/app working_dir: /app ports: - 127.0.0.1:3000:3000/tcp command: node ./dist/server/entry.mjs
Describe the bug
After a build and having Astro running in a containerized way, translation do not work because the build generates:
and docker uses mounting point, therefore path mismatch
To Reproduce
run a Astro build with
npm run build
runnpm run preview
to have the server being executed in local machine -> in this way, it worksuse this
docker-compose.yml
sample to run the same server but within a docker container: