This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampark-website.git
The following commit(s) were added to refs/heads/dev by this push:
new 88d53a00 [Improve] add docker-compose.yaml
88d53a00 is described below
commit 88d53a009a5aa87ebb13d6f54ddbebf633c98dd0
Author: benjobs <[email protected]>
AuthorDate: Sun Feb 16 13:43:08 2025 +0800
[Improve] add docker-compose.yaml
---
static/docker/.env | 28 +++++++++++++++
static/docker/docker-compose.yaml | 72 +++++++++++++++++++++++++++++++++++++++
2 files changed, 100 insertions(+)
diff --git a/static/docker/.env b/static/docker/.env
new file mode 100644
index 00000000..e0074551
--- /dev/null
+++ b/static/docker/.env
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+TZ=Asia/Shanghai
+
+STREAMPARK_IMAGE=latest
+FLINK_IMAGE=flink:1.20-java8
+FLINK_VERSION_NAME=flink-1.20
+
+SPRING_PROFILES_ACTIVE=h2 #mysql, pgsql
+#If use mysql or pgsql, please set the following parameters
+#SPRING_DATASOURCE_URL=jdbc:mysql://localhost:3306/streampark?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8
+#SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/streampark?stringtype=unspecified
+#SPRING_DATASOURCE_USERNAME=root
+#SPRING_DATASOURCE_PASSWORD=streampark
diff --git a/static/docker/docker-compose.yaml
b/static/docker/docker-compose.yaml
new file mode 100644
index 00000000..9a6152f6
--- /dev/null
+++ b/static/docker/docker-compose.yaml
@@ -0,0 +1,72 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+services:
+ streampark:
+ image: apache/streampark:${STREAMPARK_IMAGE}
+ command: '/bin/sh -c "wget -P lib
https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/8.0.31/mysql-connector-j-8.0.31.jar
&& bash bin/streampark.sh start_docker "'
+ ports:
+ - 10000:10000
+ env_file: .env
+ volumes:
+ - flink:/streampark/flink/${FLINK_VERSION_NAME}
+ - /var/run/docker.sock:/var/run/docker.sock
+ - /etc/hosts:/etc/hosts:ro
+ - ~/.kube:/root/.kube:ro
+ privileged: true
+ restart: unless-stopped
+ networks:
+ - streampark
+ healthcheck:
+ test: [ "CMD", "curl", "http://streampark:10000" ]
+ interval: 5s
+ timeout: 5s
+ retries: 120
+
+ flink-jobmanager:
+ image: ${FLINK_IMAGE}
+ ports:
+ - 8081:8081
+ command: jobmanager
+ volumes:
+ - flink:/opt/flink
+ env_file: .env
+ restart: unless-stopped
+ privileged: true
+ networks:
+ - streampark
+
+ flink-taskmanager:
+ image: ${FLINK_IMAGE}
+ depends_on:
+ - flink-jobmanager
+ command: taskmanager
+ deploy:
+ replicas: 1
+ env_file: .env
+ restart: unless-stopped
+ privileged: true
+ networks:
+ - streampark
+
+networks:
+ streampark:
+ driver: bridge
+ name: streampark
+
+volumes:
+ flink:
+