diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ad3e449d0..03eab3ee5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. -Install dependencies with yarn: +Install dependencies: ```sh -$ yarn +$ make deps ``` Then build and run the project in a Docker container: ```sh -$ yarn start +$ make dev ``` -Portainer can now be accessed at . +Portainer server can now be accessed at . and UI dev server runs on . + +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 . -### 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_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`). diff --git a/Makefile b/Makefile index 2da05072d..d087d8745 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ init-dist: 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) 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 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..." @./build/build_binary_azuredevops.sh "$(PLATFORM)" "$(ARCH)" @@ -41,7 +41,7 @@ build-storybook: ##@ Build dependencies .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 @./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 yarn dev -dev-server: ## Run the server in development mode +dev-server: build-server ## Run the server in development mode @./dev/run_container.sh