Skip to content

Published Docker image is out of sync with repo main; frontend defaults break i18n and API routing #502

@eph2

Description

@eph2

Hi, I deployed MiroFish from the published Docker image and found that the runtime frontend does not match the current repository state.

Main problems observed:

  1. The published container frontend is older than the current repo
  • /app/frontend/src/main.js in the image does not register i18n
  • frontend/package.json in the image does not include vue-i18n
  • frontend/vite.config.js in the image does not include the current aliases
  1. The frontend locale defaults are problematic for non-Chinese deployments
  • default locale falls back to zh
  • previous browser state can keep forcing Chinese
  • English users end up with a Chinese UI even when the page HTML is already set to lang="en"
  1. API base path can become duplicated in production
  • if VITE_API_BASE_URL=/api is set at deploy time, requests like /api/simulation/history become /api/api/simulation/history
  1. The image may miss the locales directory expected by the current frontend code
  • this causes Vite/runtime failures for languages.json and locale JSON imports depending on how the image was built

Suggested fixes:

  • rebuild/publish the Docker image from the current repo state
  • ensure frontend/package.json includes vue-i18n
  • ensure frontend/src/main.js registers i18n
  • keep frontend/vite.config.js aligned with the repo
  • include the locales/ directory in the image
  • consider changing the default locale fallback from zh to en or making it configurable via env
  • document that VITE_API_BASE_URL should not duplicate /api if the frontend methods already call /api/...

I validated this in production during deployment:

  • old image rendered a Chinese home page by default
  • old image generated broken API paths in some setups
  • after syncing the frontend files and dependencies with the current repo, the app rendered in English correctly and /api/simulation/history worked again

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions