Closed ppratikcr7 closed 2 years ago
hey @ppratikcr7,
Issue 1
make setup-local
in the dev branch. When that command is used the Makefile will run ./docker-setup.sh -l
. This script uses NixOS so that the node & npm version is standardized for everyone. The setup for the NixOS script is in docker.nix
, right now it will make sure everyone installs the node_packages using node v12. Whenever we migrate to node v16 we will need to update to nodejs-12_x
in docker.nix
to nodejs-16_x
. Long story short, the script uses NixOS so that means people will need to install that on their computer right now. I'm contemplating using docker again for this step to run nix in a container so people wouldn't need to explicitly install it, but I need to work on that.Issue 2
Issue 3
I'm contemplating using docker again for this step to run nix in a container for this step so people wouldn't need to explicitly install it, but I need to work on that.
Interesting idea. I'd rather require only nix (and use nix to get docker), but that might not be possible since docker requires a daemon to be running.
@kawcl Thanks for the clarifications, let us try as per your comments. We will get back in case we still face any issue.
on point 3, it is probably issue with it finding docker in PATH, which docker
can show where it's installed, could echo $PATH
to see if that PATH seems reachable.
Other thing to try would be to open up the docker desktop app, all same things are going to be found there, that's where I tend to look at the logs anyway, and some things I see googling tdocker command not found
seem to suggest that after opening the docker app the first time, in background it fixed the PATH issue and docker
commands worked as expected.
I'm contemplating using docker again for this step to run nix in a container for this step so people wouldn't need to explicitly install it, but I need to work on that.
Interesting idea. I'd rather require only nix (and use nix to get docker), but that might not be possible since docker requires a daemon to be running.
Yea I'm not sure which direction would be best.. Have nix maintain the dependencies and run the docker containers or have docker run and manage nix which manages the dependencies. There is a docker image for nix but a quick search for how to use it properly hasn't proven that fruitful. I have, however, found a source for running docker containers with nix
I'd like to make it so you only need to install either-or on your machine instead of both.
I have to take a break from this though to focus on some other work right now, I'll try and revisit it soon.
@kawcl Thanks, installing Nix did work for me, I am able to run make setup-local
now.
Let me know if this issue should be closed if we don't want anything else to be discussed here on this ticket, else it's fine if we continue to discuss further on Nix.
@danoswaltCL I will check with your resolution and let you know. Thanks :)
@kawcl We also observed a weird behaviour of docker script where it creates the containers with a different name. For e.g.: Instead of upgrade-postgres-1
the container name is upgrade_postgres_1
. So, we have to change the environment variable in the local docker env file: TYPEORM_HOST=upgrade-postgres-1
. Any idea about this inconsistency?
@ppratikcr7
Yes we noticed before and we should document it, this is likely the issue where in docker setting Use Docker Compose V2
needs to be toggled on:
That will make it consistent with using hyphens and not underscores.
@ppratikcr7 Dan would be correct on this, depending on which version of compose you are using it append names differently with "_" or "-"
Okay, thanks. Yeah, we should document all this thing in our Upgrade documentation.
@kawcl @danoswaltCL Should we close this issue?
We tried setting up local docker setup at our end in multiple systems. We are facing the below issues:
make setup-local
and even new command stated by @danoswaltCL which ismake setup
doesn't seem to work to install the npm modules. When I checked through the Makefile in dev branch, there is no command forsetup
, instead we still havesetup-local
which we had before nix changes and that time it was working for me. Can @kawcl or @danoswaltCL verify at their ends and let us know. (For now we are runningnpm ci
commands manually in all folder locations to install packages )make
command to generate all the docker images and start them. Though, I don't know if they are affecting some functionality or not.View Logs
with the error: docker command not found. Though it works for yashil. Any help on this may be a plus for me.