Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions commands/project/destroy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ function project:destroy() {
_logYellow "Deleting SSL certs"

for vhost in $(${DOCKER_COMPOSE} config | _yq_stdin e '.services.*.environment.VIRTUAL_HOST | select(length>0)'); do
_logYellow "Delete certs for ${vhost}"
rm -f ${CERT_DIR}/${vhost}.*
IFS=',' read -ra hosts <<< "$vhost"
for host in "${hosts[@]}"; do
_logYellow "Delete certs for ${host}"
rm -f ${CERT_DIR}/${host}.*
done
done

_logGreen "Finished destroying successfully"
Expand Down
5 changes: 4 additions & 1 deletion commands/project/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ function project:up() {

_logYellow "Generating SSL cert"
for vhost in $(${DOCKER_COMPOSE} config | _yq_stdin e '.services.*.environment.VIRTUAL_HOST | select(length>0)'); do
${HELPER_DIR}/generate-vhost-cert.sh ${CERT_DIR} ${vhost}
IFS=',' read -ra hosts <<< "$vhost"
for host in "${hosts[@]}"; do
${HELPER_DIR}/generate-vhost-cert.sh ${CERT_DIR} ${host}
done
done

_logYellow "Starting containers"
Expand Down