Nextjs app kamal setup Command error because .env Not referenced #1285
Unanswered
lintkurage
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am creating a webapp with Nextjs.
I'm trying to get content from headless cms and display it.
I would like to Dockerize this project and publish it via vps using kamal.
When I run kamal setup, the apikey and ServiceDomain defined in .env are not loaded.
If I use kamal, do I need to put the environment variables in the secrets file?
Currently I have environment variables defined in .env and npm run build,docker build works fine.
Is it necessary to add them to config/deploy.yml?
For projects that use API_KEY, can't we define apikey in .env and deploy to vps using kamal?
Could you please tell me how to make it work correctly?
日本語
Nextjsでwebappを制作しています.
コンテンツをヘッドレスcmsから取得して表示を行うということを行っています
このプロジェクトをDocker化してkamalを使ってvpsで公開しようと考えています
kamal setupをすると.envに定義しているapikeyとServiceDomainが読み込まれません
kamalを使うとなると環境変数はsecretsに記載して扱う必要があるのでしょうか
現状.envに環境変数を定義してnpm run build,docker buildは正しく行えています.
config/deploy.ymlに追加で記載する必要があるのでしょうか
Beta Was this translation helpful? Give feedback.
All reactions