-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Establish a standardized development environment to reduce the …
…difficulty of setup (#8193) * feat: add devcontainer tool * fix: file format * fix: config-ui not connect to devlake * fix: add apache license
- Loading branch information
1 parent
5ec1d32
commit 8c7f3c2
Showing
5 changed files
with
156 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# 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. | ||
|
||
FROM mcr.microsoft.com/devcontainers/go:1-1.22-bookworm | ||
|
||
ENV PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib:/usr/local/lib/pkgconfig | ||
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib | ||
ENV DEVLAKE_PLUGINS=bamboo,bitbucket,circleci,customize,dora,gitextractor,github,github_graphql,gitlab,jenkins,jira,org,pagerduty,refdiff,slack,sonarqube,trello,webhook | ||
|
||
RUN apt-get update -y | ||
RUN apt-get install pkg-config python3-dev default-libmysqlclient-dev build-essential libpq-dev cmake -y | ||
RUN git clone -b v1.3.0 https://github.com/libgit2/libgit2.git && cd libgit2 && mkdir build && cd build && cmake .. && make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* 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. | ||
* | ||
*/ | ||
|
||
{ | ||
"name": "Go", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "devcontainer", | ||
"workspaceFolder": "/workspace", | ||
"features": { | ||
"ghcr.io/jungaretti/features/make:1": {}, | ||
"ghcr.io/devcontainers/features/docker-in-docker:2.12.0": {}, | ||
"ghcr.io/devcontainers/features/python:1": { | ||
"version": "3.9" | ||
}, | ||
"ghcr.io/devcontainers-extra/features/poetry:2": {}, | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "18" | ||
} | ||
}, | ||
"forwardPorts": [ | ||
4000, | ||
8080 | ||
], | ||
"postCreateCommand": "npm install commitizen -g", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} | ||
}, | ||
"remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# 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. | ||
|
||
version: '3.8' | ||
services: | ||
devcontainer: | ||
build: | ||
dockerfile: Dockerfile | ||
volumes: | ||
- ..:/workspace | ||
networks: | ||
- default | ||
command: sleep infinity | ||
mysql: | ||
image: mysql:8 | ||
volumes: | ||
- mysql-storage:/var/lib/mysql | ||
restart: always | ||
ports: | ||
- 3306:3306 | ||
environment: | ||
MYSQL_ROOT_PASSWORD: admin | ||
MYSQL_DATABASE: lake | ||
MYSQL_USER: merico | ||
MYSQL_PASSWORD: merico | ||
TZ: UTC | ||
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --skip-log-bin | ||
networks: | ||
- default | ||
grafana: | ||
image: devlake.docker.scarf.sh/apache/devlake-dashboard:latest | ||
ports: | ||
- 3002:3000 | ||
volumes: | ||
- grafana-storage:/var/lib/grafana | ||
environment: | ||
GF_SERVER_ROOT_URL: "http://localhost:4000/grafana" | ||
GF_USERS_DEFAULT_THEME: "light" | ||
MYSQL_URL: mysql:3306 | ||
MYSQL_DATABASE: lake | ||
MYSQL_USER: merico | ||
MYSQL_PASSWORD: merico | ||
TZ: UTC | ||
restart: always | ||
depends_on: | ||
- mysql | ||
networks: | ||
- default | ||
|
||
volumes: | ||
mysql-storage: | ||
grafana-storage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
# | ||
# 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. | ||
# | ||
make dep | ||
npm install commitizen -g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters