Open adius opened 7 years ago
Would you please provide the format of secrets.env file?
The hyper compose accepts environment format is defined at compose document, such as:
# Set Rails/Rack environment
RACK_ENV=development
The panic will be fixed, and you can use that format as a workaround.
Thanks,
SESSION_SECRET=sdfmsjheflskehf
SENDGRID_API_KEY=asdjfalksejfdfe
Hello @adius ,
I put your content into /tmp/tmp.env
and used it into the compose file, the test is like:
[lei@h8s-single hypercli]$ hyper compose up -d -f hyper-compose.yml
Project [hypercli]: Starting project
[1/1] [web]: Starting
[1/1] [web]: Started
Project [hypercli]: Project started
[lei@h8s-single hypercli]$ hyper ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES PUBLIC IP
38e092007b51 busybox:latest "sh" 7 seconds ago Up 4 seconds hypercli-web-1
[lei@h8s-single hypercli]$ hyper exec -ti hypercli-web-1 env
HOME=/root
TERM=xterm
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=38e092007b51
SESSION_SECRET=sdfmsjheflskehf
SENDGRID_API_KEY=asdjfalksejfdfe
The compose file is:
$ cat hyper-compose.yml
version: '2'
services:
web:
image: busybox:latest
env_file:
- /tmp/tmp.env
Hello Any update on this ? I'm facing the exact same issue :/ My compose file and my env-file are located in the same folder, and I'm sure the env_file is properly formatted
Hi, @gbogard ,
It turns out that when using 'env_file', the 'environment' items (if exist in compose file) must be in the same format, e.g. XXXXX=xxxxx
Alright, thanks for your reply. This can be closed
Only occurs when I set the
env_file
field