Questions tagged [env-file]
32 questions
1
vote
0 answers
A proper place for SQL Alchemy's engine global
I'm new to the concept of using a global variable to spawn new DB Sessions. I want to import settings.py file into manage.py to call method that loads environment variables using the .env helper library dotenv. However, since the variables are not…

mekkanizer
- 722
- 2
- 9
- 28
1
vote
1 answer
docker-compose load .env from dynamic path
I have below structure
The project root .env defines the path to either ./docker/dev/.env or ./docker/prod/.env as depicted below:
environment=dev
dot_env_path=./docker/dev/.env
My docker-compose.yml contains the below service snippet:
services:
…

xiarnousx
- 575
- 6
- 18
1
vote
2 answers
Invalid Namespace specified Mongoose save collection
I am creating an application using expressjs, mongoose and ejs template engine.
I am facing an below mentioned issue while saving collection:
{"message":"Invalid namespace specified 'ecommerce\";.roleresources'"}
This is my entry script app.js…

Vikas Kumar
- 21
- 1
- 1
- 3
0
votes
0 answers
Process and use enviroment variable in nodejs in ubuntu
Haev any different when use env variable in window and linux.
In window i call normally with process.env.variable_name and can get the value in env file.
but when in ubuntu, it can't
# .env
MY_ENV_VAR=my_value
// app.js
const dotenv =…

DT Hieu
- 1
- 1
0
votes
1 answer
Cypress Github Actions load env file like env-cmd
What is the equivalent configuration for Github Action similar function like the command below:
env-cmd -f .env cypress run --component
I tried with one env var imported into Github Action, but not working:
env:
CYPRESS_PUBLIC_PATH: /public/
So,…

Darryl RN
- 7,432
- 4
- 26
- 46
0
votes
0 answers
docker-compose - env_file - variable expansion not working in second env_var
I am running into an issue and wondering if anyone has experienced it before or has a solution for it. Maybe you can help me out
I am running docker with docker-compose and I am using two env_file(s) to send parameters to my containers
My intention…

Alf
- 31
- 4
0
votes
1 answer
How do I use the .env files config from Webpack to Vite?
I recently started migrating my app from Create React App to Vite, but I am struggling to understand how to replicate the same .env file setup to Vite.
In CRA, I used CRACO and the following config:
//craco.config.js
const path =…

Octavian
- 33
- 2
- 7
0
votes
1 answer
docer-compose.yml in Django project: environment variables are not created from the .env file
My docker-compose.yml:
version: '3.8'
services:
web:
build: ./app
command: python3 manage.py runserver 0.0.0.0:8000
volumes:
- ./app/:/usr/src/app/
ports:
- 8000:8000
env_file:
- .dev.env
my Dockerfile in…
0
votes
1 answer
Getting Discord Bot Token from Env File in Python
I have a folder which has a few files: Procfile, requirements.txt, main.py and secret.env. Secret.env has one line of code in it:
TOKEN = "my bot token"
"My bot token" is my Discord token. Now, in main.py, I want to get access to this token from…

Anonymous
- 21
- 6
0
votes
1 answer
Confuse if .env file should still be filled up in NEXT.JS?
Im a little confused whether we should fill up or leave .env file empty as it is? Since during execution each environment file (.env.dev / .env.production) will append all my values into .env
So what I'm saying is, keeping .env empty and only append…

Tommy Leong
- 2,509
- 6
- 30
- 54
0
votes
0 answers
How to escape the = symbol in .env file
I try to create an application configuration with .env file, for the first I can get the value of variables for this config.
APPLICATION_NAME=MyApps
LOGGING__LOGLEVEL__DEFAULT=Warning
PROPERTY=value
Result :
Result 1
But, when I try to add…

Riyan Afriyanto
- 7
- 4
0
votes
1 answer
going from .env to environment variables
So I have been tasked with taking an existing dockerized version of a service, and creating docker images from this repository.
Creating the images is not the problem however, since the build command starts it up no problem. The issue is that this…

Flotolk
- 313
- 1
- 11
- 37
0
votes
3 answers
How to write to enviornment variables on Heroku
I have made a website meant to me used by only one person, so I want to dynamically write to .env file on Heroku without it resting,
because this is meant only for one person. I don’t want to deal with a database.
Something like…
user13152486
0
votes
1 answer
MacOS export of env var is being escaped or misinterpreted on shell
Mac OS here. On the terminal, I create the following .env file:
export FIZZ=foo
export BUZZ="$2a$10$Hk1PB6Eyf5Pu71JLfH6fCexjzOIwkctk.pQJ4oYWP.m4qdRKRQlyO"
Then I run source .env && echo $FIZZ and I see:
foo
So far, so good. But now I run echo…

hotmeatballsoup
- 385
- 6
- 58
- 136
0
votes
0 answers
How to change .env file path in Python?
My boss has changed his mind, want me to change .env file path.
We all know we can call .env variable as like this:
from decouple import config
variable_from_env = config('someVariableName')
And I know that we can call .env file outside of root…

sundowatch
- 3,012
- 3
- 38
- 66