You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(tags): replace tags identifier from record urn and type to asset id (#122)
* feat(tags): replace record urn and type in tags to asset id
* chore: update readme
* chore: update docs
* chore: update docs
* chore: update docs and makefile
* fix(tags): fix inconsistent behaviour
* fix(tags): add template not found error check in update tag handler
* chore: fix broken tests in tag
Copy file name to clipboardExpand all lines: README.md
+47-29Lines changed: 47 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,68 +37,86 @@ Explore the following resources to get started with Compass:
37
37
38
38
## Requirements
39
39
40
-
Compass is written in golang, and requires go version >= 1.16. Please make sure that the go tool chain is available on your machine. See golang’s [documentation](https://golang.org/) for installation instructions. Compass is also using [mockery](https://github.com/vektra/mockery) v2.10.0 to generate mocks.
40
+
Compass is written in Golang, and requires go version >= 1.16. Please make sure that the go toolchain is available on your machine. See Golang’s [documentation](https://golang.org/) for installation instructions.
41
41
42
-
Alternatively, you can use docker to build compass as a docker image. More on this in the next section.
42
+
Alternatively, you can use docker to build Compass as a docker image. More on this in the next section.
43
43
44
-
Compass uses elasticsearch v7 as the query and storage backend. In order to run compass locally, you’ll need to have an instance of elasticsearch running. You can either download elasticsearch and run it manually, or you can run elasticsearch inside docker by running the following command in a terminal
45
-
```
46
-
$ docker run -d -p 9200:9200 -e "discovery.type=single-node" elasticsearch:7.6.1
44
+
Compass uses PostgreSQL 13 as its main storage and Elasticsearch v7 as the secondary storage to power the search. In order to run compass locally, you’ll need to have an instance of postgres and elasticsearch running. You can either download them and run it manually, or you can run them inside docker by using `docker-compose` with `docker-compose.yaml` provided in the root of this project.
45
+
46
+
PostgreSQL details and Elasticsearch brokers can alternatively be specified via the environment variable, `ELASTICSEARCH_BROKERS` for elasticsearch and `DB_HOST`, `DB_NAME`, `DB_USER`, `DB_PASSWORD` for postgres.
47
+
48
+
If you use Docker to build compass, then configuring networking requires extra steps. Following is one of doing it by running postgres and elasticsearch inside with `docker-compose` first.
49
+
50
+
Go to the root of this project and run `docker-compose`.
51
+
52
+
```text
53
+
$ docker-compose up
47
54
```
55
+
Once postgres and elasticsearch has been ready, we can run Compass by passing in the config of postgres and elasticsearch defined in `docker-compose.yaml` file.
56
+
57
+
## Building Compass
58
+
59
+
Begin by cloning this repository then you have two ways in which you can build compass
48
60
49
-
## Running locally
50
-
Begin by cloning this repository, then you have two ways in which you can build compass
51
61
* As a native executable
52
62
* As a docker image
53
63
54
64
To build compass as a native executable, run `make` inside the cloned repository.
55
-
```
65
+
66
+
```text
56
67
$ make
57
68
```
58
69
59
70
This will create the `compass` binary in the root directory
60
71
61
72
Building compass' Docker image is just a simple, just run docker build command and optionally name the image
62
-
```
73
+
74
+
```text
63
75
$ docker build . -t compass
64
76
```
65
77
66
-
Compass interfaces with an elasticsearch cluster. Run compass using:
78
+
## Migration
79
+
Before serving Compass app, we need to run the migration first. Run this docker command to migrate Compass.
Elasticsearch brokers can alternatively be specified via the `ELASTICSEARCH_BROKERS` environment variable.
90
+
## Serving Locally
73
91
74
-
If you used Docker to build compass, then configuring networking requires extra steps. Following is one of doing it, running elasticsearch inside docker
92
+
Once the migration has been done, Compass server can be started with this command.
# create a docker network where compass and elasticsearch will reside
78
-
$ docker network create compass-net
79
97
80
-
# run elasticsearch, bound to the network we created. Since we are using the -d flag to docker run, the command inside the subshell returns the container id
81
-
$ ES_CONTAINER_ID=$(docker run -d -e "discovery.type=single-node" --net compass-net elasticsearch:7.5.2)
82
-
83
-
# run compass, passing in the hostname (container id) of the elasticsearch server
84
-
# if everything goes ok, you should say something like this:
85
-
86
-
# time="2020-04-01T18:41:00Z" level=info msg="compass v0.1.0-103-g83b909b starting on 0.0.0.0:8080" reporter=main
87
-
# time="2020-04-01T18:41:00Z" level=info msg="connected to elasticsearch cluster \"docker-cluster\" (server version 7.5.2)" reporter=main
88
-
$ docker run --net compass-net compass -p 8080:8080 -elasticsearch-brokers http://${ES_CONTAINER_ID}:9200
98
+
If you are using Compass binary, you can run this command.
0 commit comments