Skip to content

Commit 4d55553

Browse files
authored
Merge pull request #258 from plone/stack-create-site
Avoid locking issue when creating site with filestorage (alternative)
2 parents 6782781 + 1641d54 commit 4d55553

5 files changed

Lines changed: 15 additions & 12 deletions

File tree

news/257.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Avoid locking issue when creating stack site while using filestorage. @davisagli

templates/projects/classic/{{ cookiecutter.__folder_name }}/Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,18 @@ build-images: ## Build container images
115115
###########################################
116116
# Local Stack
117117
###########################################
118+
.PHONY: stack-create-site
119+
stack-create-site: ## Local Stack: Create a new site
120+
@echo "Create a new site in the local Docker stack"
121+
@echo "(Stack must not be running already.)"
122+
PLONE_VERSION=$(PLONE_VERSION) docker compose -f docker-compose.yml run --build backend ./docker-entrypoint.sh create-site
123+
118124
.PHONY: stack-start
119125
stack-start: ## Local Stack: Start Services
120126
@echo "Start local Docker stack"
121127
PLONE_VERSION=$(PLONE_VERSION) docker compose -f docker-compose.yml up -d --build
122128
@echo "Now visit: http://{{ cookiecutter.__project_slug }}.localhost"
123129

124-
.PHONY: stack-create-site
125-
stack-create-site: ## Local Stack: Create a new site
126-
@echo "Create a new site in the local Docker stack"
127-
PLONE_VERSION=$(PLONE_VERSION) docker compose -f docker-compose.yml exec backend ./docker-entrypoint.sh create-site
128-
129130
.PHONY: stack-status
130131
stack-status: ## Local Stack: Check Status
131132
@echo "Check the status of the local Docker stack"

templates/projects/classic/{{ cookiecutter.__folder_name }}/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ Deploy a local Docker Compose environment that includes the following.
6060
Run the following commands in a shell session.
6161

6262
```shell
63-
make stack-start
6463
make stack-create-site
64+
make stack-start
6565
```
6666

6767
And... you're all set! Your Plone site is up and running locally! 🚀

templates/projects/monorepo/{{ cookiecutter.__folder_name }}/Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,18 @@ build-images: ## Build container images
142142
###########################################
143143
# Local Stack
144144
###########################################
145+
.PHONY: stack-create-site
146+
stack-create-site: ## Local Stack: Create a new site
147+
@echo "Create a new site in the local Docker stack"
148+
@echo "(Stack must not be running already.)"
149+
VOLTO_VERSION=$(VOLTO_VERSION) PLONE_VERSION=$(PLONE_VERSION) docker compose -f docker-compose.yml run --build backend ./docker-entrypoint.sh create-site
150+
145151
.PHONY: stack-start
146152
stack-start: ## Local Stack: Start Services
147153
@echo "Start local Docker stack"
148154
VOLTO_VERSION=$(VOLTO_VERSION) PLONE_VERSION=$(PLONE_VERSION) docker compose -f docker-compose.yml up -d --build
149155
@echo "Now visit: http://{{ cookiecutter.__project_slug }}.localhost"
150156

151-
.PHONY: stack-create-site
152-
stack-create-site: ## Local Stack: Create a new site
153-
@echo "Create a new site in the local Docker stack"
154-
VOLTO_VERSION=$(VOLTO_VERSION) PLONE_VERSION=$(PLONE_VERSION) docker compose -f docker-compose.yml exec backend ./docker-entrypoint.sh create-site
155-
156157
.PHONY: stack-status
157158
stack-status: ## Local Stack: Check Status
158159
@echo "Check the status of the local Docker stack"

templates/projects/monorepo/{{ cookiecutter.__folder_name }}/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ Deploy a local Docker Compose environment that includes the following.
6969
Run the following commands in a shell session.
7070

7171
```shell
72-
make stack-start
7372
make stack-create-site
73+
make stack-start
7474
```
7575

7676
And... you're all set! Your Plone site is up and running locally! 🚀

0 commit comments

Comments
 (0)