Skip to content

Commit

Permalink
Chore(demo): Add command for trusting self-signed certificates
Browse files Browse the repository at this point in the history
refs #DS-743
  • Loading branch information
literat committed Jul 27, 2023
1 parent 17c2a2b commit cf0da2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/web-twig/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

PHP language is required to develop this package. In order to support other frontend developers which do not have installed PHP locally, there is a Docker image available to develop this package.

To start this project simply run `make start` and then add project certificates to your machine by `make cert`.

Please consult [`Makefile`](./Makefile) for available commands and options to setup and run this project.

## Components definition
Expand Down
6 changes: 5 additions & 1 deletion packages/web-twig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
DOCKER_COMP = docker-compose
DOCKER_PHP_SERVICE = web-twig-demo-php
DOCKER_ENCORE_SERVICE = web-twig-demo-encore
DOCKER_SERVER_SERVICE = web-twig-demo-server
SHELL = bash

# Paths
Expand All @@ -19,7 +20,7 @@ CONT_MAKE = $(PHP_CONT_PHP) make

# Misc
.DEFAULT_GOAL = help
.PHONY = help build up prestart start down logs sh bash composer vendor make phpunit test analyze icons-build
.PHONY = help build up prestart start down logs sh bash cert composer vendor make phpunit test analyze icons-build

## —— 🐳 The Spirit Web Twig Bundle Makefile 🐳 ———————————————————————————————
help: ## Outputs this help screen
Expand Down Expand Up @@ -59,6 +60,9 @@ bash: ## Connect to the PHP container

sh: bash ## Connect to the PHP container (alias for `bash`)

cert: ## Trust the Authority of server certificates
cd $(APP_DOCKER_DIR) && docker cp `docker compose ps -q $(DOCKER_SERVER_SERVICE)`:/data/caddy/pki/authorities/local/root.crt /tmp/root.crt && sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /tmp/root.crt

## —— Encore 🎭 ————————————————————————————————————————————————————————————————

encore-install: ## Install demo dependencies
Expand Down

0 comments on commit cf0da2f

Please sign in to comment.