Skip to content

How to run on Windows without docker compose

tillias edited this page May 10, 2021 · 8 revisions

If you don' want or can't use docker-compose please use this tutorial provided by https://github.com/mailtonskiran (@mailtonskiran) This tutorial is for exclusive Windows OS users

PostgreSQL:

  1. Install postgresql (ref: https://www.postgresql.org/download/windows/)
  2. Default installation path in windows OS will be C:\Program Files\PostgreSQL
  3. Under "C:\Program Files\PostgreSQL\13\data" check for pg_hba.conf file
  4. Modify the entry "host all postgres 127.0.0.1/32 scram-sha-256" to "host all postgres 127.0.0.1/32 trust"
  5. ALTER USER postgres with password 'new_password';
  6. Rollback the change in pg_hba.conf file and
  7. Restart the PostgreSQL Server: a. Method 1: using pg_ctl -D "C:\Program Files\PostgreSQL\13\data" restart. b. Method 2: Open Run Window by Winkey + R Type services.msc Search Postgres service based on version installed. Click stop, start or restart the service option.
  8. Check if you can login to postgres using pgsql -U postgress (Supply password as 'new_password' (new password that you chose) when asked, \q for quitting postgresql prompt).

env.list: Add below entries and create a file called env.list

DB_HOST=host.docker.internal
DB_NAME=postgres
DB_PASSWORD=postgres
DB_PORT=5432
DB_USER=postgres
CSP_IMAGE_SRC=*
SERVER_PORT=2080

Pull the docker image:

docker pull tillias/microcatalog [Using docker desktop and enabling WSL2 is one of the options]

Java Version:

Make sure you run Java 11 or above

Execution Step:

docker run --network="host" --env-file env.list -p 8080:2080 tillias/microcatalog OR
docker run --env-file env.list -p 8080:2080 tillias/microcatalog

Note: Wait for some time as it may take some time to take effect and then hit http://localhost:8080

Clone this wiki locally