Skip to content

Commit

Permalink
Current state of staging
Browse files Browse the repository at this point in the history
  • Loading branch information
DonRichards committed Aug 2, 2024
1 parent 908ca60 commit 85c8d9c
Show file tree
Hide file tree
Showing 39 changed files with 1,141 additions and 39 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,9 @@ Dockerfile
# User provided certs for TLS.
certs
acme

database_dump.sql

idc-staging.cloud.library.jhu.edu.csr

idc-staging.cloud.library.jhu.edu.key
16 changes: 16 additions & 0 deletions IDC-README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## To run
```shell
make jhu_up
```

## To stop
Stop without losing data.
```shell
make jhu_down
```

## To stop and reset
Stop and reset without removing codebase directory.
```shell
make jhu_clean
```
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ 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 $(CODEBASE_PACKAGE) /tmp/codebase; mv /tmp/codebase/* /home/root;'; \
docker container run --rm -v $(CURDIR)/codebase:/home/root -u nginx $(REPOSITORY)/nginx:$(TAG) bash -c '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'; \
docker container run --rm -v $(CURDIR)/codebase:/home/root -u nginx $(REPOSITORY)/nginx:$(TAG) bash -c 'cd /home/root && composer install'; \
fi
$(MAKE) set-files-owner SRC=$(CURDIR)/codebase ENVIRONMENT=starter
$(MAKE) compose-up
Expand All @@ -173,14 +173,14 @@ starter_dev: generate-secrets
fi
$(MAKE) set-files-owner SRC=$(CURDIR)/codebase ENVIRONMENT=starter_dev
$(MAKE) compose-up
docker compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx /var/www/drupal/ ; su nginx -s /bin/bash -c "composer install"'
docker compose exec -T -u nginx drupal sh -c 'composer install && chown -R nginx:nginx .'
$(MAKE) starter-finalize ENVIRONMENT=starter_dev


.PHONY: production
production: init
$(MAKE) compose-up
docker compose exec -T drupal with-contenv bash -lc 'composer install; chown -R nginx:nginx .'
docker compose exec -T -u nginx drupal sh -c 'composer install && chown -R nginx:nginx .'
$(MAKE) starter-finalize ENVIRONMENT=starter


Expand Down
Loading

0 comments on commit 85c8d9c

Please sign in to comment.