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

Usage with docker #134

Open
ShahriarKh opened this issue Oct 11, 2024 · 0 comments
Open

Usage with docker #134

ShahriarKh opened this issue Oct 11, 2024 · 0 comments

Comments

@ShahriarKh
Copy link
Contributor

I'm trying to integrate this to our ci/cd, but:

  • If there are no envs set, adonis complains about it and node ace docs:generate fails. I'm not sure if generating swagger docs really needs envs or not, and because of this, I need to add .envs to my ci/cd pipeline too.
  • Docker packs the build folder, but generating docs need the original soruce code. (running it inside build folder complains about model paths and stuff)

So, three possible solutions are:

  1. Fix doc generation so it's not dependent on envs. (Don't run start\env.ts when running node ace docs:generate)
  2. Make it possible to generate docs inside build folder (so it can be added to docker compose where .env is present)

Another simple (and maybe the best) way is to add swagger.yaml and swagger.json to git, and just copy them (like how we copy package.json and other files in docker), but developers should make sure that it's always the latest version. Maybe setting up a predev script can force this, or a hook before each commit. But eh, kinda overkill.

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

No branches or pull requests

1 participant