Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: myfjdthink/doris-docker-compose
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: qlangtech/doris-docker-compose
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 9 commits
  • 5 files changed
  • 2 contributors

Commits on Aug 16, 2022

  1. Update README.md

    baisui1981 authored Aug 16, 2022
    Copy the full SHA
    6d1aa7e View commit details
  2. Update README.md

    baisui1981 authored Aug 16, 2022
    Copy the full SHA
    500689c View commit details
  3. Update Dockerfile

    baisui1981 authored Aug 16, 2022
    Copy the full SHA
    5de6968 View commit details
  4. Update Dockerfile

    baisui1981 authored Aug 16, 2022
    Copy the full SHA
    20ad001 View commit details

Commits on Aug 31, 2022

  1. update

    baisui1981 committed Aug 31, 2022
    Copy the full SHA
    5d025cc View commit details
  2. Copy the full SHA
    565da61 View commit details

Commits on Oct 24, 2022

  1. use local network

    baisui1981 committed Oct 24, 2022
    Copy the full SHA
    daec6ff View commit details

Commits on Nov 11, 2022

  1. Update docker-compose.yml

    make the image useable
    baisui1981 authored Nov 11, 2022
    Copy the full SHA
    dd4a825 View commit details

Commits on Nov 12, 2022

  1. Update README.md

    baisui1981 authored Nov 12, 2022
    Copy the full SHA
    90f5551 View commit details
Showing with 38 additions and 23 deletions.
  1. +3 −0 .gitignore
  2. +13 −7 README.md
  3. +4 −4 be/Dockerfile
  4. +14 −8 docker-compose.yml
  5. +4 −4 fe/Dockerfile
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Logs

*.tar.gz

logs
*.log
npm-debug.log*
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -15,12 +15,15 @@ wget https://dist.apache.org/repos/dist/release/doris/1.0/1.0.0-incubating/apach

## compose up
```bash
docker-compose up -d
docker-compose -f docker-compose.yml up -d
```

## config be
connect doris use mysql client

```shell
mysql -h127.0.0.1 -uroot -P9030
```
'''
default user is root
password is empty

@@ -33,9 +36,7 @@ SHOW PROC '/backends';

config backends
```sql
ALTER SYSTEM ADD BACKEND "doris-docker-compose_doris-be_1:9050";
ALTER SYSTEM ADD BACKEND "doris-docker-compose_doris-be_2:9050";
ALTER SYSTEM ADD BACKEND "doris-docker-compose_doris-be_3:9050";
ALTER SYSTEM ADD BACKEND "doris-docker-compose-doris-be-1:9050";
```

check backends config again, backends Alive value should be ture
@@ -44,6 +45,9 @@ SHOW PROC '/backends';
```

test sql

使用一个副本

```sql
create database if not exists testdb;
drop table if exists testdb.test_table;
@@ -53,7 +57,9 @@ create table if not exists testdb.test_table(
)
ENGINE=olap
UNIQUE KEY(name)
DISTRIBUTED BY HASH(name);
DISTRIBUTED BY HASH(name)
PROPERTIES("replication_num" = "1")
;

insert into testdb.test_table values ("nick", 1), ("nick2", 3);
select * from testdb.test_table;
@@ -73,4 +79,4 @@ restart
docker-compose up -d
```

Note: 因为数据会被清除,本项目 only for dev
Note: 因为数据会被清除,本项目 only for dev
8 changes: 4 additions & 4 deletions be/Dockerfile
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@ WORKDIR /opt/
# tar -zxvf apache-doris-1.0.0-incubating-bin.tar.gz &&\
# mv apache-doris-1.0.0-incubating-bin doris

COPY ../apache-doris-1.0.0-incubating-bin.tar.gz .
RUN tar -zxvf apache-doris-1.0.0-incubating-bin.tar.gz &&\
mv apache-doris-1.0.0-incubating-bin doris
COPY ./apache-doris-1.1.1-bin-x86.tar.gz .
RUN tar -zxvf apache-doris-1.1.1-bin-x86.tar.gz &&\
mv apache-doris-1.1.1-bin-x86 doris

ENTRYPOINT ["sh", "-c", "DORIS_HOME=/opt/doris/be/ PATH=$PATH:$DORIS_HOME/bin start_be.sh"]
ENTRYPOINT ["sh", "-c", "DORIS_HOME=/opt/doris/be/ PATH=$PATH:$DORIS_HOME/bin start_be.sh"]
22 changes: 14 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -2,21 +2,27 @@ version: "2"

services:
doris-fe:
hostname: fe
build:
context: ./
dockerfile: ./fe/Dockerfile
image: doris-fe:latest
ports:
- 9031:9030
- 8031:8030
image: registry.cn-hangzhou.aliyuncs.com/tis/doris-fe:1.1.3
links:
- doris-be
#ports:
# - 9031:9030
# - 8031:8030
depends_on:
- doris-be
network_mode: host

doris-be:
hostname: be
build:
context: ./
dockerfile: ./be/Dockerfile
image: doris-be:latest
deploy:
mode: replicated
replicas: 3
image: registry.cn-hangzhou.aliyuncs.com/tis/doris-be:1.1.3
network_mode: host
# deploy:
# mode: replicated
# replicas: 3
8 changes: 4 additions & 4 deletions fe/Dockerfile
Original file line number Diff line number Diff line change
@@ -7,9 +7,9 @@ WORKDIR /opt/
# mv apache-doris-1.0.0-incubating-bin doris

# for local debug
COPY ../apache-doris-1.0.0-incubating-bin.tar.gz .
RUN tar -zxvf apache-doris-1.0.0-incubating-bin.tar.gz &&\
mv apache-doris-1.0.0-incubating-bin doris
COPY ./apache-doris-1.1.1-bin-x86.tar.gz .
RUN tar -zxvf apache-doris-1.1.1-bin-x86.tar.gz &&\
mv apache-doris-1.1.1-bin-x86 doris

RUN alternatives --set java java-1.8.0-openjdk.x86_64 &&\
alternatives --set javac java-1.8.0-openjdk.x86_64 &&\
@@ -20,4 +20,4 @@ RUN alternatives --set java java-1.8.0-openjdk.x86_64 &&\
# config fe priority_networks
EXPOSE 8030 9083

ENTRYPOINT ["sh", "-c", "DORIS_HOME=/opt/doris/fe/ PATH=$PATH:$DORIS_HOME/bin start_fe.sh"]
ENTRYPOINT ["sh", "-c", "DORIS_HOME=/opt/doris/fe/ PATH=$PATH:$DORIS_HOME/bin start_fe.sh"]