INSTALL.md 1.1 KB
Newer Older
T
tanggen 已提交
1
# Installing Ligase
2

T
tanggen 已提交
3
Ligase is designed to be a Cloud Native application. We recommend deploy Ligase via docker.
4

T
tanggen 已提交
5
This document shows how to start up Ligase on a single machine
6 7 8

## Requirements

T
tanggen 已提交
9 10 11
* Go 1.13 or higher
* Postgres 9.5 or higher
* Apache Kafka 0.10.2+
12

T
tanggen 已提交
13 14
## Setup denpendent services
recommended way:
15 16

```bash
T
tanggen 已提交
17
docker-compose up -d
18
```
19

T
tanggen 已提交
20
## Build 
21

T
tanggen 已提交
22
### Build for docker
23 24

```bash
T
tanggen 已提交
25 26
./build.sh
docker build -t ligase .
27 28
```

T
tanggen 已提交
29
### Build for local host
30 31

```bash
T
tanggen 已提交
32
./build.sh
33 34
```

T
tanggen 已提交
35
add those to **/etc/hosts** if you want to run ligase in your local host.
36

T
tanggen 已提交
37 38 39 40 41 42
```shell
127.0.0.1  pg-master
127.0.0.1  zookeeper
127.0.0.1  kafka
127.0.0.1  redis
127.0.0.1  nats
43
```
44

T
tanggen 已提交
45
## Configuration
46

T
tanggen 已提交
47
Replace ./config/config.yaml with your own configuration if you didn't use the recommended way to setup denpendent services. 
48 49


T
tanggen 已提交
50
## Run
51

T
tanggen 已提交
52
## Run in docker
53

T
tanggen 已提交
54 55
```sh
docker run --network ligase_default --expose 8008 --detach --name ligase ligase
56 57
```

T
tanggen 已提交
58
### Run in local host
59

T
tanggen 已提交
60
1. In order to run ligase in your local host, follow the steps in https://github.com/edenhill/librdkafka to install librdkafka first.
61

T
tanggen 已提交
62
2. Then start ligase by:
63

T
tanggen 已提交
64 65 66 67
```sh
export SERVICE_NAME=monolith
./start.sh
```