-
Notifications
You must be signed in to change notification settings - Fork 41
Running Graphspace using Docker & Docker‐Compose
In order to run graphspace locally using docker you need to install docker & docker-compose in your local machine. before running the docker-compose file make sure you have a docker version >= 20.10.21 & docker-compose version >= 1.25.0. The following instructions should apply to computers running a version of the Linux or OS X operating systems.
-
Download the GraphSpace code by running git clone https://github.com/Murali-group/GraphSpace.git or by downloading the latest release: https://github.com/Murali-group/GraphSpace/releases.
git clone https://github.com/Murali-group/GraphSpace.git
-
Visit the GraphSpace directory:
cd GraphSpace
-
Now run the command:
docker-compose -f docker-compose.yaml up --build
(before running this command make sure you don't have any local or docker container running with postgres on same port as5432
) -
Once the docker-compose succesfully builds all the images open your browser and visit
0.0.0.0:8000
In case if the user, developer wants to run the graphspace image using Docker locally (for testing purposes) without using docker-compose file make sure to follow the below commands and instructions to create and run the docker image!
-
Create the docker network intially:
docker network create graphspace_network
-
Pull the postgres, elasticsearch images & build the graphspace container:
docker pull postgres:9.6
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.5.2
docker build -t graphspace . (if you are working as a developer and want to reflect same changes in your docker image)
OR
docker pull maheshkasbe/graphspace:latest
- Now run the postgres image with environment variables as shown here:
docker run -d --name db -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=graphspace --network graphspace_network postgres:9.6
- Now Create extensions inside our postgres docker container:
docker exec -it db psql -U postgres graphspace
CREATE EXTENSION IF NOT EXISTS "pg_trgm";
CREATE EXTENSION IF NOT EXISTS "btree_gin";
-
Now up the elasticsearch container using following command:
docker run -d --name elasticsearch -p 9200:9200 --network graphspace_network docker.elastic.co/elasticsearch/elasticsearch:7.5.2
-
At last we are ready to run our Graphspace container:
docker run -d --name graphspace_container -p 8000:8000 --network graphspace_network graphspace
-
Now just open your browser and visit:
http://0.0.0.0:8000
In case if you want to test the production file then make sure you have following things configured
-
The docker-compose.prod.yaml file is responsible to run the graphspace on production and this file points to env file secrets.env for all the secrets and configurations (
secrets.env
file need to be changed or reconfigured with your values) -
Now once we have our secrets configured inside secrets.env file we are ready to launch graphspace on production
-
Run
docker-compose -f docker-compose.prod.yaml up
Visithttp://0.0.0.0:8000