Closed raphaelbernhart closed 2 years ago
I fixed the error with the following steps:
I thought with nuxt build all the env variables aso were built in the .nuxt directory. But as it turns out you have to copy the nuxt.config.js file into the production environment. This is not documented anywhere so it was hard to solve the problem.
Solution:
I changed my dockerfile from:
COPY --from=build /app/package.json /app/
COPY --from=build /app/.nuxt /app/.nuxt
COPY --from=build /app/static /app/static
to:
COPY --from=build /app/.nuxt /app/.nuxt
COPY ./package.json /app/
COPY ./nuxt.config.js /app/
COPY ./static /app/static
This solves the issue :)
Thanks for noticing :)
Hey there,
I want to send mail via nuxtjs/nuxt-mail. In development both via nuxt dev and nuxt start commands it works perfect. But if I switch to docker/k8s it is not working. It throws an 404 error as if axios is misconfigured.
my techstack:
My nuxt.config.js
dockerfile
Thanks for the help :)