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

DOCKER <error> You must set the ADDRESS environment variable. #117

Open
pejix opened this issue Dec 27, 2020 · 13 comments · May be fixed by #118
Open

DOCKER <error> You must set the ADDRESS environment variable. #117

pejix opened this issue Dec 27, 2020 · 13 comments · May be fixed by #118

Comments

@pejix
Copy link

pejix commented Dec 27, 2020

You must set the ADDRESS environment variable.

Any idea how to fix this?
I'm running docker.

@lorenzwinkler1
Copy link

Apperantly you must specify the environment variable "ADDRESS" when starting

with for example -e ADDRESS=YOUR_ADRESS
when using "run"

Unfortunately i do not have a clue what that adress should be. I tried it using my IP, localhost, but nothing did work. Should be covered in the docs

@gauravspatel
Copy link

http://[your-ip-here]:[your-port] or https:// if you're using SSL

@lorenzwinkler1
Copy link

ADDRESS=http://[myip]:9736
^

SyntaxError: Unexpected token ':'
at new Script (vm.js:101:7)
at createScript (vm.js:262:10)
at Object.runInThisContext (vm.js:310:10)
at internal/process/execution.js:77:19
at [eval]-wrapper:6:22
at evalScript (internal/process/execution.js:76:60)
at internal/main/eval_string.js:23:3

@lorenzwinkler1
Copy link

Using the command
docker run -p 9736:9736 ottomated/crewlink-server:latest -e ADDRESS=http://[ip]:9736

@pejix
Copy link
Author

pejix commented Dec 27, 2020

Thanks!

@pejix
Copy link
Author

pejix commented Dec 27, 2020

ADDRESS=http://78.67.xx.xx:9736
^

SyntaxError: Unexpected token ':'
at new Script (vm.js:101:7)
at createScript (vm.js:262:10)
at Object.runInThisContext (vm.js:310:10)
at internal/process/execution.js:77:19
at eval-wrapper:6:22
at evalScript (internal/process/execution.js:76:60)
at internal/main/eval_string.js:23:3
eval:1
ADDRESS=http://78.67.xx.xx:9736
^

SyntaxError: Unexpected token ':'
at new Script (vm.js:101:7)
at createScript (vm.js:262:10)
at Object.runInThisContext (vm.js:310:10)
at internal/process/execution.js:77:19
at eval-wrapper:6:22
at evalScript (internal/process/execution.js:76:60)
at internal/main/eval_string.js:23:3

@Dragonfreaky
Copy link

I got this issue as well, even tho I run through NodeJS + Yarn.
I couldn't for the life of me figure out how to set it without adding additional modules or such..

So I just hardcoded it in the src\index.ts file.
line: 49
Replace var address = process.env.ADDRESS; with var address = process.env.ADDRESS || '9736';

So pretty much added the port number as an optional value.

Hopefully it's helpful, looking forward to a better solution.

@joshuaho96
Copy link

This is a dupe of this issue: #116

@MoSadie
Copy link

MoSadie commented Dec 27, 2020

@lorenzwinkler1 and @pejix your issue is probably because you have the -e argument at the end, try putting it before the ottomated/crewlink-server:latest part. Any argument after the image is passed to the container as a command to run in that container.

Ex: docker run -e ADDRESS='http://your.ip.or.domain.here' -d -p 9736:9736 ottomated/crewlink-server:latest

@joshuaho96
Copy link

If this is intended behavior can we get an update in the readme to note this?

@pejix
Copy link
Author

pejix commented Dec 28, 2020

@lorenzwinkler1 and @pejix your issue is probably because you have the -e argument at the end, try putting it before the ottomated/crewlink-server:latest part. Any argument after the image is passed to the container as a command to run in that container.

Ex: docker run -e ADDRESS='http://your.ip.or.domain.here' -d -p 9736:9736 ottomated/crewlink-server:latest

THANKS SIR!

@popeter45
Copy link

the ADDRESS variable works on my docker desktop instance but when i try on my synologoy diskstation the docker runs but cant connect to the server at all

@Zedifuu
Copy link

Zedifuu commented Feb 1, 2021

ADDRESS=http://78.67.xx.xx:9736
^

SyntaxError: Unexpected token ':'
at new Script (vm.js:101:7)
at createScript (vm.js:262:10)
at Object.runInThisContext (vm.js:310:10)
at internal/process/execution.js:77:19
at eval-wrapper:6:22
at evalScript (internal/process/execution.js:76:60)
at internal/main/eval_string.js:23:3
eval:1
ADDRESS=http://78.67.xx.xx:9736
^

SyntaxError: Unexpected token ':'
at new Script (vm.js:101:7)
at createScript (vm.js:262:10)
at Object.runInThisContext (vm.js:310:10)
at internal/process/execution.js:77:19
at eval-wrapper:6:22
at evalScript (internal/process/execution.js:76:60)
at internal/main/eval_string.js:23:3

ADDRESS="http://78.67.xx.xx:9736"

Make it a string, else it no gonna work. " "

Also if you're using docker, I'd really recommend docker-compose.
I speak about it over here: #165 (comment)

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 a pull request may close this issue.

8 participants