mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
docs(build): update contrib guidelines to use makefile [EE-5519] (#8997)
This commit is contained in:
parent
96de026eba
commit
2347133438
2 changed files with 18 additions and 10 deletions
|
@ -79,25 +79,33 @@ The feature request process is similar to the bug report process but has an extr
|
||||||
|
|
||||||
Ensure you have Docker, Node.js, yarn, and Golang installed in the correct versions.
|
Ensure you have Docker, Node.js, yarn, and Golang installed in the correct versions.
|
||||||
|
|
||||||
Install dependencies with yarn:
|
Install dependencies:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ yarn
|
$ make deps
|
||||||
```
|
```
|
||||||
|
|
||||||
Then build and run the project in a Docker container:
|
Then build and run the project in a Docker container:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ yarn start
|
$ make dev
|
||||||
```
|
```
|
||||||
|
|
||||||
Portainer can now be accessed at <https://localhost:9443>.
|
Portainer server can now be accessed at <https://localhost:9443>. and UI dev server runs on <http://localhost:8999>.
|
||||||
|
|
||||||
|
if you want to build the project you can run:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
make build
|
||||||
|
```
|
||||||
|
|
||||||
|
For additional make commands, run `make help`.
|
||||||
|
|
||||||
Find more detailed steps at <https://docs.portainer.io/contribute/build>.
|
Find more detailed steps at <https://docs.portainer.io/contribute/build>.
|
||||||
|
|
||||||
### Build customisation
|
### Build customization
|
||||||
|
|
||||||
You can customise the following settings:
|
You can customize the following settings:
|
||||||
|
|
||||||
- `PORTAINER_DATA`: The host dir or volume name used by portainer (default is `/tmp/portainer`, which won't persist over reboots).
|
- `PORTAINER_DATA`: The host dir or volume name used by portainer (default is `/tmp/portainer`, which won't persist over reboots).
|
||||||
- `PORTAINER_PROJECT`: The root dir of the repository - `${portainerRoot}/dist/` is imported into the container to get the build artifacts and external tools (defaults to `your current dir`).
|
- `PORTAINER_PROJECT`: The root dir of the repository - `${portainerRoot}/dist/` is imported into the container to get the build artifacts and external tools (defaults to `your current dir`).
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -23,7 +23,7 @@ init-dist:
|
||||||
|
|
||||||
build: build-server build-client ## Build the server and client
|
build: build-server build-client ## Build the server and client
|
||||||
|
|
||||||
build-client: init-dist client-deps ## Build the client
|
build-client: init-dist ## Build the client
|
||||||
export NODE_ENV=$(ENV) && yarn build --config $(WEBPACK_CONFIG)
|
export NODE_ENV=$(ENV) && yarn build --config $(WEBPACK_CONFIG)
|
||||||
|
|
||||||
build-server: init-dist ## Build the server binary
|
build-server: init-dist ## Build the server binary
|
||||||
|
@ -32,7 +32,7 @@ build-server: init-dist ## Build the server binary
|
||||||
build-image: build ## Build the Portainer image locally
|
build-image: build ## Build the Portainer image locally
|
||||||
docker buildx build --load -t portainerci/portainer:$(TAG) -f build/linux/Dockerfile .
|
docker buildx build --load -t portainerci/portainer:$(TAG) -f build/linux/Dockerfile .
|
||||||
|
|
||||||
devops: clean init-dist server-deps build-client ## Build the server binary for CI
|
devops: clean init-dist deps build-client ## Build the server binary for CI
|
||||||
echo "Building the devops binary..."
|
echo "Building the devops binary..."
|
||||||
@./build/build_binary_azuredevops.sh "$(PLATFORM)" "$(ARCH)"
|
@./build/build_binary_azuredevops.sh "$(PLATFORM)" "$(ARCH)"
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ build-storybook:
|
||||||
|
|
||||||
##@ Build dependencies
|
##@ Build dependencies
|
||||||
.PHONY: deps server-deps client-deps tidy
|
.PHONY: deps server-deps client-deps tidy
|
||||||
deps-all: server-deps client-deps ## Download all client and server build dependancies
|
deps: server-deps client-deps ## Download all client and server build dependancies
|
||||||
|
|
||||||
server-deps: ## Download dependant server binaries
|
server-deps: ## Download dependant server binaries
|
||||||
@./build/download_binaries.sh $(PLATFORM) $(ARCH)
|
@./build/download_binaries.sh $(PLATFORM) $(ARCH)
|
||||||
|
@ -79,7 +79,7 @@ dev: ## Run both the client and server in development mode
|
||||||
dev-client: ## Run the client in development mode
|
dev-client: ## Run the client in development mode
|
||||||
yarn dev
|
yarn dev
|
||||||
|
|
||||||
dev-server: ## Run the server in development mode
|
dev-server: build-server ## Run the server in development mode
|
||||||
@./dev/run_container.sh
|
@./dev/run_container.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue