Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

add gitlab quickstart (#639)

qsliu2915ff79fdbe
diff --git a/quickstart/README.md b/quickstart/README.md
index cf49531618..df0b9e007f 100644
--- a/quickstart/README.md
+++ b/quickstart/README.md
@@ -56,7 +56,7 @@ Prerequisite:
1. Compose up quickstart.
```
- docker compose -f clickhoust-cluster-quickstart.docker-compose.yml
+ docker compose -f clickhoust-cluster-quickstart.docker-compose.yml up
```
This compose file sets up a 2 shards * 2 replica clickhouse cluster.
@@ -74,3 +74,45 @@ Prerequisite:
![](./assets/clickhouse-cluster-02.png)
There are other 3 nodes in host `clickhouse02`, `clickhouse03` and `clickhouse04`. Repeat the steps to add them.
+
+## GitLab (macOS Apple Silicon)
+
+1.
+ ```
+ git clone https://github.com/bytebase/bytebase.git && \
+ cd bytebase/quickstart
+ ```
+
+1. Compose up quickstart.
+ ```
+ docker compose -f gitlab-quickstart.docker-compose.yml up
+ ```
+
+ It might take several minutes for Gitlab to boot up.
+
+
+1. Visit localhost:8080, you should see Bytebase page. In `Settings` > `Version Control`, enter GitLab instance URL `http://localhost:1080`, and click `Next`.
+
+ ![](./assets/gitlab-01.png)
+
+1. In step 2, you need to set up an application in GitLab.
+
+ ![](./assets/gitlab-02.png)
+
+ Visit localhost:1080, you should see Gitlab page. The default username/password is `root` and `bytebase`.
+
+ After logged in, click user avatar and then `Preferences`.
+
+ ![](./assets/gitlab-03.png)
+
+ Follow the tips on bytebase page to add application.
+
+ ![](./assets/gitlab-04.png)
+
+ Copy the Application ID and Secret to bytebase.
+
+ ![](./assets/gitlab-05.png)
+
+ ![](./assets/gitlab-06.png)
+
+ Finally, `Confirm and add`. A GitLab self-host has been added as a Git provider.
diff --git a/quickstart/assets/gitlab-01.png b/quickstart/assets/gitlab-01.png
new file mode 100644
index 0000000000..e001e7e7c3
Binary files /dev/null and b/quickstart/assets/gitlab-01.png differ
diff --git a/quickstart/assets/gitlab-02.png b/quickstart/assets/gitlab-02.png
new file mode 100644
index 0000000000..f4f69c496e
Binary files /dev/null and b/quickstart/assets/gitlab-02.png differ
diff --git a/quickstart/assets/gitlab-03.png b/quickstart/assets/gitlab-03.png
new file mode 100644
index 0000000000..a3a6f823fd
Binary files /dev/null and b/quickstart/assets/gitlab-03.png differ
diff --git a/quickstart/assets/gitlab-04.png b/quickstart/assets/gitlab-04.png
new file mode 100644
index 0000000000..ba338e9e1a
Binary files /dev/null and b/quickstart/assets/gitlab-04.png differ
diff --git a/quickstart/assets/gitlab-05.png b/quickstart/assets/gitlab-05.png
new file mode 100644
index 0000000000..6b93ff17cd
Binary files /dev/null and b/quickstart/assets/gitlab-05.png differ
diff --git a/quickstart/assets/gitlab-06.png b/quickstart/assets/gitlab-06.png
new file mode 100644
index 0000000000..e185bb72a2
Binary files /dev/null and b/quickstart/assets/gitlab-06.png differ
diff --git a/quickstart/gitlab-quickstart.docker-compose.yml b/quickstart/gitlab-quickstart.docker-compose.yml
new file mode 100644
index 0000000000..794317617d
--- /dev/null
+++ b/quickstart/gitlab-quickstart.docker-compose.yml
@@ -0,0 +1,45 @@
+version: '3.7'
+
+services:
+ bb:
+ image: bytebase/bytebase:0.13.0
+ init: true
+ container_name: bytebase
+ restart: always
+ ports:
+ - 8080:8080
+ # # Uncomment the following lines to persist data
+ # volumes:
+ # - ~/.bytebase/data:/var/opt/bytebase
+ command:
+ [
+ "--data",
+ "/var/opt/bytebase",
+ "--host",
+ "http://localhost",
+ "--port",
+ "8080"
+ ]
+
+ gitlab:
+ image: yrzr/gitlab-ce-arm64v8
+ restart: always
+ container_name: gitlab-ce
+ privileged: true
+ deploy:
+ resources:
+ reservations:
+ memory: 4096M
+ ports:
+ - 1022:22
+ - 1080:80
+ - 1443:443
+ hostname: gitlab.example.com
+ environment:
+ - GITLAB_OMNIBUS_CONFIG="nginx['redirect_http_to_https'] = true; "
+ - GITLAB_ROOT_PASSWORD=bytebase
+ # # Uncomment the following lines to persist GitLab data
+ # volumes:
+ # - $GITLAB_HOME/conf:/etc/gitlab:z
+ # - $GITLAB_HOME/logs:/var/log/gitlab:z
+ # - $GITLAB_HOME/data:/var/opt/gitlab:z