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

create-.env-from-env - fixes #636 #637

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

fashberg
Copy link
Contributor

@fashberg fashberg commented Oct 16, 2022

next.config.js is using require("dotenv").config(); - but there is no .env inside the container!
The .env is outside the container when using docker-compose. Documentation says nothing about this.

I've added an entrypoint.sh which creates an .env-file from the ENV-Variables .

Fixes #636

@poeti8
Copy link
Member

poeti8 commented Oct 16, 2022

Thanks for this, I'll try it soon.

@fashberg
Copy link
Contributor Author

the bug occurs with docker-composre, and also using helm from https://artifacthub.io/packages/helm/christianknell/kutt or truecharts on truenas (https://github.com/truecharts/charts/tree/master/charts/stable/kutt) i've got that isssue. Maybe because of working base-functionality not everyone checks immediately that there's something wrong.

Another idea is just not to use dotenv, but reading process.env directly.

@@ -3,6 +3,7 @@ version: "3"
services:
kutt:
image: kutt/kutt
#build: .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, can be omitted. It's just for building local containers from local code

@FallenAngel666
Copy link

@poeti8 I tested this change here by creating this test docker image. The change works as expected. The site name is shown on the main page and the url in the /terms is correct. Furthermore reCAPTCHA is now also working since the site key is also being read from the .env file.

This PR fixes multiple issues. Great finding and good work @fashberg

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 this pull request may close these issues.

Parameters missing in docker/k8s environment [PR]
3 participants