Skip to content

Commit

Permalink
Merge pull request #336 from joshdentremont/starter_from_codebase
Browse files Browse the repository at this point in the history
Starter from codebase
  • Loading branch information
aOelschlager committed Apr 26, 2023
2 parents 9c84fde + 4d3a125 commit 0743825
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,14 @@ local: generate-secrets


.PHONY: starter
## Make a local site with codebase directory bind mounted, using starter site.
## Make a local site with codebase directory bind mounted, using starter site unless other package specified in .env or present already.
starter: QUOTED_CURDIR = "$(CURDIR)"
starter: generate-secrets
$(MAKE) starter-init ENVIRONMENT=starter
if [ -z "$$(ls -A $(QUOTED_CURDIR)/codebase)" ]; then \
docker container run --rm -v $(CURDIR)/codebase:/home/root $(REPOSITORY)/nginx:$(TAG) with-contenv bash -lc 'composer create-project islandora/islandora-starter-site:dev-main /tmp/codebase; mv /tmp/codebase/* /home/root;'; \
docker container run --rm -v $(CURDIR)/codebase:/home/root $(REPOSITORY)/nginx:$(TAG) with-contenv bash -lc 'composer create-project $(CODEBASE_PACKAGE) /tmp/codebase; mv /tmp/codebase/* /home/root;'; \
else \
docker container run --rm -v $(CURDIR)/codebase:/home/root $(REPOSITORY)/nginx:$(TAG) with-contenv bash -lc 'cd /home/root; composer install'; \
fi
$(MAKE) set-files-owner SRC=$(CURDIR)/codebase ENVIRONMENT=starter
docker-compose up -d --remove-orphans
Expand Down
4 changes: 4 additions & 0 deletions sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ DOCKER_BUILDKIT=1
# Dockerfile to use when building the custom project.
PROJECT_DRUPAL_DOCKERFILE=Dockerfile

# Packagist repo to use when creating a site with make starter
# Change this if you want to build from a different codebase than the starter site
CODEBASE_PACKAGE=islandora/islandora-starter-site:dev-main

# Includes `traefik` as a service, if false assume we are sharing a traefik
# from another project.
INCLUDE_TRAEFIK_SERVICE=true
Expand Down

0 comments on commit 0743825

Please sign in to comment.