a) Supplying DB credentials as command line arguments b) Supplying DB credentials using a text file.Ī) Open command prompt and execute the below command to run the Camunda in a docker container named " Camunda-postgres-env."ĭocker run -d -name Camunda-postgres-env -p 8080:8080 -link postgres:db -e DB_DRIVER= -e DB_URL=jdbc:postgresql://db:5432/postgres -e DB_USERNAME=postgres -e DB_PASSWORD= postgres-password -e WAIT_FOR=db:5432 Camunda/Camunda-bpm-platform:latestī) Alternate way to pass DB details to run Camunda. Open the docker-desktop to see a container with the name "Postgres" is running.īelow are the 2 steps given to run a Camunda in a docker container.
Note: Choose a password for the Postgres database. Step 2:Ī) Open command prompt and execute the below command to run the Postgres in a docker container named "Postgres."ĭocker run -name postgres -e POSTGRES_PASSWORD= postgres-password -d postgres
Install Docker-desktop and pgAdmin downloaded as above.
Restart postgres sudo service postgres restart. You will need to edit the configuration file to add the docker IP address as trusted: sudo nano /etc/postgresql/12/main/pg_hba.conf and add this line host all all 172.17.0.2/24 trust to the ‘# IPv4 local connections:’ block. To do that, you can run the following commands: sudo -u postgres psql Copy that IP, in my case it was 172.17.0.2. That is the IP of your running pgAdmin docker container. If you try to add the new server, you will most likely get an error notice about Postgres complaining about an IP not having access.
The password is something you should know, otherwise see this comment on StackOverflow how to reset your postgres password. For the hostname use database since we defined that earlier in the command above. Next, from the ‘Quick Links’ section on the pgAdmin dashboard, you can add a new server. If everything went well until this point, you should be able to access pgAdmin4 at and log in with the email and password you specified in the command above. You may need to restart your terminal so that the alias is loaded. Next, start pgAdmin by running pgadmin-boot or the command above. The YOUR_LOCAL_IPV4_ADDRESS is the IP address of your computer on the local area network, assuming Postgres is running from your local machine. Next, I added the following command to my ~/.bash_aliases so I can quickly run the container:Īlias pgadmin-boot='docker run -add-host=database:YOUR_LOCAL_IPV4_ADDRESS -p 5050:80 -e "PGADMIN_DEFAULT_EMAIL=YOUR_PGADMIN_LOGIN_EMAIL" -e "PGADMIN_DEFAULT_PASSWORD=YOUR_PGADMIN_LOGIN_PASS" -d dpage/pgadmin4' This assumes you already have Docker installed in your Ubuntu.įirst, docker pull dpage/pgadmin4 to pull the image on your computer. Until this is solved, or in case you want to run pgAdmin from a Docker container, here’s what worked for me. ApDockerized pgAdmin 4 & local Postgres server on Ubuntu 20.04Īt this time of writing, pgAdmin4 is not available for installation on Ubuntu 20.04, due to an unresolved Python dependency.