Open krodelabestiole opened 7 months ago
In my own docker-compose
the following works for me:
cms:
# headless decap cms service on port 80
image: itsmejoeeey/docker-decap-cms-standalone:3.0.3
restart: always
environment:
- ORIGINS=abc.example.com
...
Might need further investigation.
I'm experiencing the same issue, trying to run it with localhost. I'll include the full error:
2024-05-29 16:10:42 Node.js v18.17.1 2024-05-29 16:10:44 /app/netlify-cms-github-oauth-provider/login_script.js:5 2024-05-29 16:10:44 throw new Error('process.env.ORIGIN MUST be comma separated list \ 2024-05-29 16:10:44 ^ 2024-05-29 16:10:44 2024-05-29 16:10:44 Error: process.env.ORIGIN MUST be comma separated list of origins that login can succeed on. 2024-05-29 16:10:44 at Object.
(/app/netlify-cms-github-oauth-provider/login_script.js:5:9) 2024-05-29 16:10:44 at Module._compile (node:internal/modules/cjs/loader:1256:14) 2024-05-29 16:10:44 at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) 2024-05-29 16:10:44 at Module.load (node:internal/modules/cjs/loader:1119:32) 2024-05-29 16:10:44 at Module._load (node:internal/modules/cjs/loader:960:12) 2024-05-29 16:10:44 at Module.require (node:internal/modules/cjs/loader:1143:19) 2024-05-29 16:10:44 at require (node:internal/modules/cjs/helpers:121:18) 2024-05-29 16:10:44 at Object. (/app/netlify-cms-github-oauth-provider/callback.js:1:24) 2024-05-29 16:10:44 at Module._compile (node:internal/modules/cjs/loader:1256:14) 2024-05-29 16:10:44 at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
I think I see your problem(s), first of all you can find the RegEx that parses ORIGINS here. There are two issues:
docker run
example in the README.md you have the line -e ORIGINS='<your root url>'
, this should be -e ORIGINS=<your root url>
without the single quotes, these cause the above RegEx to fail.ENV ORIGINS=http://localhost
, this also doesn't pass the RegEx.You can play around with the RegEx here to see for yourself, I'd just remove the single quotes in your example command and amend the Dockerfile to something like ENV ORIGINS=localhost.com
.
You can see why @krodelabestiole's attempts all failed but yours is fine, none of them have a domain, and no quotes, and no protocol.
hello, i'm trying to use decap with a local backend using docker compose and traefik. (i'm not sure yet if feasible...)
unfortunately no matter what value I try for ORIGINS env var I run into this issue :
Here is the concerned part of my docker-compose.yml :
Here are the different values I have tried (trying also different pseudo domains with the traefik label - that wouldn't make any difference yet) :
and many others and since I found this line in your Dockerfile
ENV ORIGINS=http://localhost
I also tried things like:no success yet !