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

Wrong alias in docker-compose.yml #36

Closed
rekn64 opened this issue Aug 26, 2020 · 1 comment
Closed

Wrong alias in docker-compose.yml #36

rekn64 opened this issue Aug 26, 2020 · 1 comment

Comments

@rekn64
Copy link

rekn64 commented Aug 26, 2020

api seems unable to connect to the db. i think the problem is the wrong alias used in docker-compose.yml file

suggestion:
change
MONGODB_CONNECTION_STRING=mongodb://isp-db:27017/isp
to
MONGODB_CONNECTION_STRING=mongodb://db:27017/isp

and add the option

    links:
        - db

to the api service.

also change the environment in example.env to
MONGODB_CONNECTION_STRING=mongodb://db:27017/isp

furthermore:

example.env seems to miss the NODE_ENV enviroment

suggestion add to example.env
NODE_ENV=production

@kitsunekyo
Copy link
Owner

db connection
should be fixed in commit b929359

link
link is unnecessary, as within docker all services are reachable by service name by default. link just gives you the option to configure additional aliases.

node_env in example.env
not required, as we only test for NODE_ENV === "production", and it assumes development for anything else.
the example.env should mimic the development environment by default, and should be adapted by whoever is deploying, to fit the required env.

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

No branches or pull requests

2 participants