Skip to content

Commit a424a5f

Browse files
author
Muhammad Luthfi Fahlevi
committed
feat: separate drop uuid users column to another MR
1 parent f2972f1 commit a424a5f

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -166,27 +166,27 @@ docker build . -t compass
166166
Before serving Compass app, we need to run the migration first. Run this docker command to migrate Compass.
167167

168168
```text
169-
$ docker run --rm --net compass_storage -p 8080:8080 -e ELASTICSEARCH_BROKERS=http://es:9200 -e DB_HOST=postgres -e DB_PORT=5432 -e DB_NAME=compass -e DB_USER=compass -e DB_PASSWORD=compass_password gotocompany/compass compass server migrate
169+
$ docker run --rm --net compass_storage -p 8080:8080 -e ELASTICSEARCH_BROKERS=http://es:9200 -e ELASTICSEARCH_PASSWORD= -e DB_HOST=postgres -e DB_PORT=5432 -e DB_NAME=compass -e DB_USER=compass -e DB_PASSWORD=compass_password gotocompany/compass compass server migrate
170170
```
171171

172172
If you are using Compass binary, you can run this command.
173173

174174
```text
175-
./compass -elasticsearch-brokers "http://<broker-host-name>" -db-host "<postgres-host-name>" -db-port 5432 -db-name "<postgres-db-name>" -db-user "<postgres-db-user>" -db-password "<postgres-db-password> server migrate"
175+
./compass -elasticsearch-brokers "http://<broker-host-name>" -elasticsearch-password "" -db-host "<postgres-host-name>" -db-port 5432 -db-name "<postgres-db-name>" -db-user "<postgres-db-user>" -db-password "<postgres-db-password> server migrate"
176176
```
177177

178178
## Serving locally
179179

180180
Once the migration has been done, Compass server can be started with this command.
181181

182182
```text
183-
docker run --net compass_storage -p 8080:8080 -e ELASTICSEARCH_BROKERS=http://es:9200 -e DB_HOST=postgres -e DB_PORT=5432 -e DB_NAME=compass -e DB_USER=compass -e DB_PASSWORD=compass_password gotocompany/compass compass server start
183+
docker run --net compass_storage -p 8080:8080 -e ELASTICSEARCH_BROKERS=http://es:9200 -e ELASTICSEARCH_PASSWORD= -e DB_HOST=postgres -e DB_PORT=5432 -e DB_NAME=compass -e DB_USER=compass -e DB_PASSWORD=compass_password gotocompany/compass compass server start
184184
```
185185

186186
If you are using Compass binary, you can run this command.
187187

188188
```text
189-
./compass -elasticsearch-brokers "http://<broker-host-name>" -db-host "<postgres-host-name>" -db-port 5432 -db-name "<postgres-db-name>" -db-user "<postgres-db-user>" -db-password "<postgres-db-password> server start"
189+
./compass -elasticsearch-brokers "http://<broker-host-name>" -elasticsearch-password "" -db-host "<postgres-host-name>" -db-port 5432 -db-name "<postgres-db-name>" -db-user "<postgres-db-user>" -db-password "<postgres-db-password> server start"
190190
```
191191

192192
## Running tests

compass.yaml.example

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ newrelic:
2929

3030
elasticsearch:
3131
brokers: http://localhost:9200
32+
password:
3233
request_timeout: 10s
3334

3435
db:

docs/docs/configuration.md

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ log_level: info # debug|info|warning|error|fatal
3838

3939
elasticsearch:
4040
brokers: http://localhost:9200 #required
41+
password:
4142

4243
db:
4344
host: localhost #required
@@ -68,6 +69,7 @@ See [configuration reference](./reference/configuration.md) for the list of all
6869
```sh title=".env"
6970
LOG_LEVEL=info
7071
ELASTICSEARCH_BROKERS=http://localhost:9200
72+
ELASTICSEARCH_PASSWORD=
7173
DB_HOST=localhost
7274
DB_PORT=5432
7375
DB_NAME=compass
@@ -240,6 +242,7 @@ app:
240242

241243
secretConfig: {}
242244
# COMPASS_ELASTICSEARCH_BROKERS: ~
245+
# COMPASS_ELASTICSEARCH_PASSWORD: ~
243246
# COMPASS_NEWRELIC_LICENSEKEY: ~
244247
# COMPASS_DB_HOST: ~
245248
# COMPASS_DB_PORT: 5432

internal/store/elasticsearch/es.go

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const (
2828

2929
type Config struct {
3030
Brokers string `mapstructure:"brokers" default:"http://localhost:9200"`
31+
Password string `mapstructure:"password" default:""`
3132
RequestTimeout time.Duration `mapstructure:"request_timeout" default:"10s"`
3233
}
3334

@@ -131,6 +132,7 @@ func NewClient(logger log.Logger, config Config, opts ...ClientOption) (*Client,
131132
esClient, err := elasticsearch.NewClient(elasticsearch.Config{
132133
Addresses: brokers,
133134
Transport: nrelasticsearch.NewRoundTripper(nil),
135+
Password: config.Password,
134136
// uncomment below code to debug request and response to elasticsearch
135137
// Logger: &estransport.ColorLogger{
136138
// Output: os.Stdout,

0 commit comments

Comments
 (0)