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
"KEY" Environment Variable is missing. #12202
Comments
Hi, unfortunately I can't seem to reproduce this on my end. Perhaps there's some indentation issue where your environment variables aren't being set properly? I'd recommend trying the following minimal compose file just to isolate any other possibilities and print out the environment variables of the container when it starts up: services:
directus:
container_name: directus
image: directus/directus:latest
entrypoint: ["/bin/sh", "-c"]
command: env
ports:
- 8055:8055
environment:
KEY: '255d861b-5ea1-5996-9aa3-922530ec40b1'
SECRET: '6116487b-cda1-52c2-b5b5-c8022c45e263'
ADMIN_EMAIL: 'admin@admin.com'
ADMIN_PASSWORD: 'admin' For example when I try the compose file above, logging the container does show me that KEY and SECRET etc are present: Alternatively you can also try the other slightly different syntax of setting environment variables (refer here: https://docs.docker.com/compose/compose-file/compose-file-v3/#environment) such as: environment:
- KEY=255d861b-5ea1-5996-9aa3-922530ec40b1
- SECRET=6116487b-cda1-52c2-b5b5-c8022c45e263
- ADMIN_EMAIL=admin@admin.com
- ADMIN_PASSWORD=admin Closing this for now as I believe it's more so a docker-compose and/or compose file issue rather than a bug with Directus, but do let us know whether it's really a syntax issue here once you have the chance to confirm 👍 |
Hmm I've also tried installing on a Ubuntu server (DO droplet) and it is still working fine on my end as seen here: M1yeFqyIbD.mp4so this may be tricky to find out what's happening on your (and OP) setup. Just to be sure, are you running |
My bad. What you mentioned was the issue for me here. I had to cd into directory. Working fine now. |
Thanks for confirming! I've also just realized OP phrased it as 2 steps, |
Thanks for confirming it's not an actual bug!
Pardon my confusion here, but initially you did point out you were using docker-compose, however it seems like this is a local installation instead? It also seems like all the log lines are show as As for the actual error you are seeing here, I would recommend opening a new issue detailing the steps you precisely did for your particular directus instance so that we can investigate further with more information at hand 👍 |
Pardon my confusion here, but initially you did point out you were using docker-compose, however it seems like this is a local installation instead?
It also seems like all the log lines are show as
As for the actual error you are seeing here, I would recommend opening a new issue detailing the steps you precisely did for your particular directus instance so that we can investigate further with more information at hand 👍
|
Preflight Checklist
Describe the Bug
"KEY" Environment Variable is missing.
To Reproduce
yml content :
docker-compose up -d
npx directus start
Errors Shown
npx directus start
What version of Directus are you using?
latest
What version of Node.js are you using?
v16.14.0
What database are you using?
ms sql
What browser are you using?
Chrome
What operating system are you using?
Windows 10
How are you deploying Directus?
Docker
The text was updated successfully, but these errors were encountered: