Skip to content

Commit 8c74827

Browse files
Add make target for production like local setup (#243)
1 parent 4e893b8 commit 8c74827

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ bats:
8383
./scripts/run-app.sh "31.0.8" 1
8484
bats --verbose-run --timing --trace ./tests/bats
8585

86+
# Complete production like but static Nextcloud and app setup
87+
.PHONY: prod
88+
prod: oc
89+
./scripts/run-app.sh "31.0.8" 1
90+
8691
# Same as clean but also removes dependencies and build related folders
8792
.PHONY: distclean
8893
distclean: clean

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ make npm
168168

169169
### Available Make targets
170170

171+
- make prod
172+
- Builds the app for production and deploys a production Nextcloud instance with the app inside. Sets everything up. Nextcloud on http://localhost:8080 and SMTP testing on http://localhost:8081. Code changes are not automatically picked up; you need to rebuild the container -> run `make prod` again.
171173
- make build
172174
- Fetches PHP dependencies and builds frontend assets.
173175
- make composer
@@ -201,7 +203,7 @@ docker stop nextcloud-container || true
201203
- Re-run make local to rebuild and restart the environment.
202204

203205
Notes:
204-
- SMTP testing (smtp4dev) is available when using the Docker Compose-based test setup; it listens on http://localhost:8081. The simple make local flow runs a single Nextcloud container on port 8080.
206+
- SMTP testing (smtp4dev) is available when using make target `make prod`; it listens on http://localhost:8081. The simple `make local` flow runs a single Nextcloud container on port 8080.
205207
- The helper script scripts/run-app.sh orchestrates CI and test flows; for local development, stick to the Make targets above.
206208

207209
### Useful commands
@@ -217,7 +219,7 @@ Notes:
217219

218220
### Smtp4Dev
219221

220-
When developing locally, SMTP4Dev is launched on port 8081 to simulate sending emails through the app.
222+
When developing locally, SMTP4Dev is launched on make target `make prod` on port 8081 to simulate sending emails through the app.
221223

222224
For more information about Smtp4Dev, please refer to the [official README](https://github.com/rnwood/smtp4dev/blob/master/README.md).
223225

0 commit comments

Comments
 (0)