Skip to content

Commit

Permalink
✨ add dev backend
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuess committed Nov 1, 2024
1 parent bfc13ae commit c00a32b
Show file tree
Hide file tree
Showing 31 changed files with 243 additions and 1,283 deletions.
79 changes: 17 additions & 62 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,72 +22,31 @@ YELLOW=`tput setaf 3`
GIT_FOLDER=$(CURRENT_DIR)/.git
PRE_COMMIT=pipx run --spec 'pre-commit==3.7.1' pre-commit

PLONE_VERSION=6
DOCKER_IMAGE=plone/server-dev:${PLONE_VERSION}
# DOCKER_IMAGE_ACCEPTANCE=plone/server-acceptance:${PLONE_VERSION}
# TODO use build image with c.e.plone
DOCKER_IMAGE_ACCEPTANCE=plone/server-acceptance:${PLONE_VERSION}

ADDON_NAME='volto-searchkit-block'


.PHONY: help
help: ## Show this help
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"



###########################################
# Backend
# dev backend
###########################################
.PHONY: backend-install
backend-install: ## Create virtualenv and install Plone
$(MAKE) -C "./backend/" install
$(MAKE) backend-create-site

.PHONY: backend-build
backend-build: ## Build Backend
$(MAKE) -C "./backend/" install

.PHONY: backend-create-site
backend-create-site: ## Create a Plone site with default content
$(MAKE) -C "./backend/" create-site

.PHONY: backend-update-example-content
backend-update-example-content: ## Export example content inside package
$(MAKE) -C "./backend/" update-example-content

.PHONY: backend-start
backend-start: ## Start Plone Backend
$(MAKE) -C "./backend/" start

.PHONY: backend-test
backend-test: ## Test backend codebase
@echo "Test backend"
$(MAKE) -C "./backend/" test

# .PHONY: install
# install: ## Install
# @echo "Install Backend & Frontend"
# if [ -d $(GIT_FOLDER) ]; then $(PRE_COMMIT) install; else echo "$(RED) Not installing pre-commit$(RESET)";fi
# $(MAKE) backend-install
# $(MAKE) frontend-install

# .PHONY: start
# start: ## Start
# @echo "Starting application"
# $(MAKE) backend-start
# $(MAKE) frontend-start

# .PHONY: clean
# clean: ## Clean installation
# @echo "Clean installation"
# $(MAKE) -C "./backend/" clean
# $(MAKE) -C "./frontend/" clean

# .PHONY: check
# check: ## Lint and Format codebase
# @echo "Lint and Format codebase"
# $(PRE_COMMIT) run -a

.PHONY: dev-backend-start-monolingual
dev-backend-start-monolingual: ## Start backend dev server
export INDEX_PASSWORD=paraDiesli,17
export PLONE_PASSWORD=admin
export PLONE_SITE_PREFIX_PATH=Plone
$(MAKE) -C "./backend/" dev-backend-start-monolingual

.PHONY: dev-backend-start-multilingual
dev-backend-start-multilingual: ## Start backend dev server
export INDEX_PASSWORD=paraDiesli,17
export PLONE_PASSWORD=admin
export PLONE_SITE_PREFIX_PATH=Plone
$(MAKE) -C "./backend/" dev-backend-start-multilingual


###########################################
Expand Down Expand Up @@ -157,11 +116,6 @@ ci-test: ## Run unit tests in CI
VOLTOCONFIG=$(pwd)/volto.config.js pnpm --filter @plone/volto i18n
CI=1 RAZZLE_JEST_CONFIG=$(CURRENT_DIR)/jest-addon.config.js pnpm --filter @plone/volto test -- --passWithNoTests

# .PHONY: backend-docker-start
# backend-docker-start: ## Starts a Docker-based backend for development
# @echo "$(GREEN)==> Start Docker-based Plone Backend$(RESET)"
# docker run -it --rm --name=backend -p 8080:8080 -e SITE=Plone $(DOCKER_IMAGE)

## Storybook
.PHONY: storybook-start
storybook-start: ## Start Storybook server on port 6006
Expand All @@ -174,6 +128,7 @@ storybook-build: ## Build Storybook
mkdir -p $(CURRENT_DIR)/.storybook-build
pnpm run storybook-build -o $(CURRENT_DIR)/.storybook-build


###########################################
# Acceptance monolingual
###########################################
Expand Down
14 changes: 0 additions & 14 deletions backend/.dockerignore

This file was deleted.

54 changes: 0 additions & 54 deletions backend/.editorconfig

This file was deleted.

22 changes: 0 additions & 22 deletions backend/.flake8

This file was deleted.

51 changes: 0 additions & 51 deletions backend/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions backend/CONTRIBUTORS.md

This file was deleted.

41 changes: 0 additions & 41 deletions backend/Dockerfile

This file was deleted.

43 changes: 0 additions & 43 deletions backend/Dockerfile.acceptance

This file was deleted.

Loading

0 comments on commit c00a32b

Please sign in to comment.