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

Language file are not found in Docker container #240

Closed
likp opened this issue Nov 26, 2024 · 3 comments · Fixed by #246
Closed

Language file are not found in Docker container #240

likp opened this issue Nov 26, 2024 · 3 comments · Fixed by #246

Comments

@likp
Copy link
Contributor

likp commented Nov 26, 2024

When running the docker container the language files seems not to be configured properly.
Only getting the language key names.

@runejo
Copy link
Contributor

runejo commented Nov 27, 2024

Can you show an example?

@likp
Copy link
Contributor Author

likp commented Nov 27, 2024

If you run a new instance of the conatiner with

docker run --rm -p 8080:8080 ghcr.io/pxtools/pxwebapi:latest

Then if you e.g. fetching the default selection for table TAB004 with

curl http://localhost:8080/api/v2/tables/TAB004/data?outputFormat=json-stat2

You will set that the label for the table is Total air emissions PxcMetaTitleBy sector, contents, year PxcMetaTitleAnd greenhouse gas.
PxcMetaTitleBy and PxcMetaTitleAnd indicates that it can not locate the language fies in the container

@runejo
Copy link
Contributor

runejo commented Nov 28, 2024

I see the problem, the app.config has the wrong path after a `dotnet publish``

<paxiom>
  <localization filespath="../../../wwwroot/Languages" basefile="pxlang"/>
  <grouping filespath="../../../wwwroot/Aggregations"/>
</paxiom>

should have been

<paxiom>
  <localization filespath="/wwwroot/Languages" basefile="pxlang"/>
  <grouping filespath="/wwwroot/Aggregations"/>
</paxiom>

I'll fix it 👍

@runejo runejo linked a pull request Nov 28, 2024 that will close this issue
runejo added a commit that referenced this issue Nov 28, 2024
* Create app.config

* Update Dockerfile

---------

Co-authored-by: Rune Johansen <[email protected]>
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 a pull request may close this issue.

2 participants