How can I change note on docker-compose? - docker-compose

I am traying to run docker-compose, but an error occur:
eric#pop-os:~/Documentos/web$ docker-compose up Postgres
bash: /home/eric/.local/bin/docker-compose: Arquivo ou diretório inexistente
When I run which docker-compose:
eric#pop-os:~/Documentos//web$ which docker-compose
/home/eric/.pyenv/shims/docker-compose
It is possible to change the path to docker-compose on Linux Pop Os to solve this problem?
I search on the web but not find any solution.

To solution this case I find 2 answers:
create an alias on ~/.bashrc --> but this solution gave me other problems.
When I installed docker-compose I installed it with pip. So
I uninstalled it and install docker-compose again but in the
operational system!

Related

Mongo command not found on Mac using zsh?

I installed Mongo Db via the official site. I also created the below folder
~/data/db
I added the mongo files in the location as follows :
/usr/local/mongodb
Im using zsh so setting the environment variables as suggested in the bash_profile doesnt work for me.
My .zshrc file looks as follows
export PATH=$HOME/bin:/usr/local/bin:$PATH
export MONGO_PATH=/usr/local/mongodb
export PATH=MONGO_PATH/bin:$PATH
I also ran the source command as follows :
source ~/.zshrc
However even after trying variations of various answers, I still get :
zsh: command not found: mongo
What am I missing here?
I have the same problem when I try to install Mongo with official doc
This instruction help me to run MongoDB on MacOS Mojave 10.14.6
Try mongod --version
If there is no Mongodb installed try enter brew install mongodb
After this check installation again with mongod --version
Then use brew services start mongodb to run MongoDB on startup
Try brew install mongodb-community-shell.
My case:
I did try brew services start mongodb to solve it, but face this issue:
Error: No available formula with the name "mongodb". Did you mean mongosh or monetdb?
Here is a recommendation on how to solve it where brew install mongodb-community-shell mentioed as part install of the latest Mongo shell: https://developpaper.com/fix-mac-brew-installation-mongodb-error-no-available-formula-with-the-name-mongodb/
this one worked for me.in new macbook or air we cant find .zhrc or bash
in new mac its .zprofile. so change the path in .zprofile
export PATH=/opt/homebrew/bin:$PATH
brew install mongodb-community-shell
you can try it it work for me because when downloading mongodb it lacks the shell so when typing mongo in terminal it won't work

Mongo Setting Path

I am currently running macOS Sierra (latest version) and I have zshell installed. I have tried to follow the steps to install MongoDB Community Edition Manually by using the following commands after downloading the binaries from the MongoDB Download Center.
tar -zxvf mongodb-osx-ssl-x86_64-3.6.2.tgz
mkdir -p mongodb
cp -R -n mongodb-osx-ssl-x86_64-3.6.2/ mongodb
export PATH=mongodb-install-directory/bin:$PATH
On step 4, my mongodb install directory path is in /Users/(my username)/mongodb. Therefore, I have run the following command:
export PATH=/Users/(my username)/mongodb/bin:$PATH
From the (my username) directory, I tried to run mongod and got the message zsh: command not found: mongod. However, when I go into /Users/(my username)/mongodb/bin and run ./mongod, everything works except for my data path not being set.
From here, I have tried to set the db path by running the following command:
./mongod --dbpath /Users/(my username)/mongodb/data/db
Then I ran ./mongod and the data path was not found. What am I doing wrong? I even tried to install MongoDB Community Edition with Homebrew and the same errors popped up.
I am not sure if this would make a difference, but I have installed vagrant in the past and I was able to use MongoDB.
I suggest re-install MongoDB once again, use brew
brew update
brew install mongodb

docker-compose up command not working on console

I have 5 images and try to run docker images through docker-compose up, but it is showing nothing on the console.
while running the docker-compose --version it is showing nothing.
docker-compose does not come bundled with the docker-engine. You need to install it separately after installing the engine. Follow the instructions given in this link:
https://docs.docker.com/compose/install/

How to uninstall eclipse che completely on mac osx?

How to uninstall eclipse che completely on mac osx?
Used mac osx installer to install binary. Seems che is always running on 8080 even killed the process and stopped docker.
https://eclipse.org/che/
I couldn't find the better way for uninstall on Mac but you can stop the Tomcat embedded in Eclipse Che.
The path is /Applications/EclipseChe3.12.5.2.app/Contents/Resources/eclipse-che/tomcat/bin
Next step is stop the Tomcat instance and finally delete the folder EclipseChe3.12.5.2.app because that's my Eclipse Che version.
So, I hope this is helpfully for you
If you are using Docker the process is different.
Get the list of active instance in Docker by running the following command in Terminal: docker ps
Then you can stop the running instance by running in docker stop XXX where XXX is the name of the running container instance. You may have more than one container instance to stop.
Then you can remove it by running docker rm XXX and then you can list images that are present on your system by running docker images
If you want to completely remove Che, then pickup for the images list the ones that are related to che and remove them by running the following command: docker mi image_name
Last command to stop docker on your mac will be docker-machin stop environment_name. If you do not know the name of the running environment you can figure it out by running docker-machine ls

Installed Postgres.app but it won't work

I just installed Postgres.app on my Mac but it won't work properly. I finished the installation and the app icon is on the menu bar and it says it is listening on port 5432, however, that is what happens if I try to run it from the command-line:
~ $ psql
zsh: correct 'psql' to 'sl' [nyae]? n
zsh: command not found: psql
I had previously installed PostgreSQL via Homebrew but removed it before installing Postgres.app. I am running Mac OS X Lion.
I appreciate any help, I really want to have PostgreSQL running on my machine.
The psql binary for Postgres.app is inside the application bundle and you'll have to add the appropriate directory to your PATH. From the fine manual:
Configure your $PATH
Postgres.app includes many command line tools. If you want to use them, you must configure the $PATH variable.
If you are using bash (default shell on OS X), add the following line to ~/.bash_profile:
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
[...]
So adjust your PATH setting in your zsh config files to include the
Contents/Versions/latest/bin
directory inside your Postgres.app bundle.
I'm reading this as of April 2014 and the directory you must include in your path as far as my Postgres app is concerned is slightly different.
I had to include this:
PATH="/Applications/Postgres.app/Contents/Versions/9.3/bin:$PATH"
I can now run psql in my terminal.
On zsh shell you have the modify .zshrc:
PSQL_PATH="/Applications/Postgres.app/Contents/Versions/latest/bin"
PATH="$PATH:$PSQL_PATH"
On prompt:
exec $SHELL
which psql
What you should do is to use /latest instead of version so you dont need to change it again when updating Postgres.
How to: http://postgresapp.com/documentation/cli-tools.html
then run:
. ~/.bash_profile
to reload .bash_profile and update any functions you add.
This might seem stupid, but I'm curious where you installed Postgres.app? As was suggested in mu is too short's answer, the documentation mentions adding /Applications/Postgres.app/Contents/MacOS/bin to your path. However, this requires that you have installed Postgres.app in your /Applications/ folder.
Before trying any of the more complicated solutions you might have found on Stack Overflow, and other resources via Google, you should make sure you've installed Postgres.app to the right place. It may be as simple as moving Postgres.app to /Applications/ since psql will be found in /Applications/Postgres.app before any other places.
Alternatively, you could use whatever path to Postgres.app you would like. So if you want it in your home directory, then you could use export PATH="~/Postgres.app/Contents/MacOS/bin:$PATH".
HTH
I'm a previous Ubuntu user, now in OSX Trying to run the "which sql" and "pg_restore" commands directly from a terminal I opened didn't work. I clicked on the elephant icon and opened a terminal by "Open psql". Once I've quit from the psql console and written the commands in that terminal, they all worked.
On ZSH terminal, before trying the above solutions you have to install Postgres in the first place. While using Hombrew
First, hit,
brew install postgres Then check if it is installed by which psql