Skip to content

Commit dbf4abe

Browse files
authored
Customer certificates + remove the default certificates (#555)
* Customer certificates + remove the default certificates * Update the docs links
1 parent ec07331 commit dbf4abe

9 files changed

Lines changed: 26 additions & 54 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ node_modules
44

55
deployment/*
66
!deployment/.gitkeep
7-
7+
generator/openssl/default.crt
8+
generator/openssl/default.key

bin/command/install/bootstrap.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,17 @@ function Command::bootstrap() {
7777

7878
local USER_FULL_ID=$(Environment::getFullUserId)
7979

80+
local CERT_DIR="${HOME}/.spryker/certs"
81+
mkdir -p "${CERT_DIR}"
82+
83+
KEY_FILE="${CERT_DIR}/${SPR_CUSTOM_KEY:-default.key}"
84+
CRT_FILE="${CERT_DIR}/${SPR_CUSTOM_CERT:-default.crt}"
85+
86+
if [[ -f "${KEY_FILE}" && -f "${CRT_FILE}" ]]; then
87+
cp "${CERT_DIR}/default.key" "${SOURCE_DIR}/generator/openssl/default.key"
88+
cp "${CERT_DIR}/default.crt" "${SOURCE_DIR}/generator/openssl/default.crt"
89+
fi
90+
8091
Console::verbose::start "Building generator..."
8192
docker build -t spryker_docker_sdk \
8293
-f "${SOURCE_DIR}/generator/Dockerfile" \
@@ -133,6 +144,14 @@ function Command::bootstrap() {
133144
cp "${SOURCE_DIR}/.dockerignore.default" .dockerignore
134145
fi
135146

147+
Console::info "${DESTINATION_DIR}"
148+
149+
if [[ ! -f "${KEY_FILE}" || ! -f "${CRT_FILE}" ]]; then
150+
cp "${DESTINATION_DIR}/context/nginx/ssl/ca.key" "${CERT_DIR}/default.key"
151+
cp "${DESTINATION_DIR}/context/nginx/ssl/ca.crt" "${CERT_DIR}/default.crt"
152+
fi
153+
154+
136155
Console::info "Deployment is generated into ${LGRAY}${DESTINATION_DIR}"
137156
Console::log "Use ${OK}docker/sdk$([ "${SPRYKER_PROJECT_NAME}" != 'default' ] && echo -n " -p ${SPRYKER_PROJECT_NAME}") up${NC} to start the application."
138157
Console::log ''

docs/06-installation/02-installation-guides/02-installing-in-development-mode-on-macos-and-linux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,5 @@ To get the full and up-to-date list of commands, run `docker/sdk help`.
105105
* [Configuring debugging](../../02-development/05-configuring-debugging.md)
106106
* [Deploy file reference - 1.0](../../07-deploy-file/02-deploy.file.reference.v1.md)
107107
* [Configuring services](../../06-configuring-services.md)
108-
* [Setting up a self-signed SSL certificate](https://documentation.spryker.com/docs/setting-up-a-self-signed-ssl-certificate)
108+
* [Setting up a self-signed SSL certificate](https://docs.spryker.com/docs/dg/dev/set-up-spryker-locally/configure-after-installing/set-up-a-self-signed-ssl-certificate.html)
109109
* [Additional DevOPS guidelines](https://documentation.spryker.com/docs/additional-devops-guidelines)

docs/06-installation/02-installation-guides/03-installing-in-development-mode-on-windows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,5 @@ To get the full and up-to-date list of commands, run `docker/sdk help`.
130130
* [Configuring debugging](../../02-development/05-configuring-debugging.md)
131131
* [Deploy file reference - 1.0](../../07-deploy-file/02-deploy.file.reference.v1.md)
132132
* [Configuring services](../../06-configuring-services.md)
133-
* [Setting up a self-signed SSL certificate](https://documentation.spryker.com/docs/setting-up-a-self-signed-ssl-certificate)
133+
* [Setting up a self-signed SSL certificate](https://docs.spryker.com/docs/dg/dev/set-up-spryker-locally/configure-after-installing/set-up-a-self-signed-ssl-certificate.html)
134134
* [Additional DevOPS guidelines](https://documentation.spryker.com/docs/additional-devops-guidelines)

docs/06-installation/02-installation-guides/04-installing-in-demo-mode-on-macos-and-linux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,5 @@ To get the full and up-to-date list of commands, run `docker/sdk help`.
106106
* [Configuring debugging](../../02-development/05-configuring-debugging.md)
107107
* [Deploy file reference - 1.0](../../07-deploy-file/02-deploy.file.reference.v1.md)
108108
* [Configuring services](../../06-configuring-services.md)
109-
* [Setting up a self-signed SSL certificate](https://documentation.spryker.com/docs/setting-up-a-self-signed-ssl-certificate)
109+
* [Setting up a self-signed SSL certificate](https://docs.spryker.com/docs/dg/dev/set-up-spryker-locally/configure-after-installing/set-up-a-self-signed-ssl-certificate.html)
110110
* [Additional DevOPS guidelines](https://documentation.spryker.com/docs/additional-devops-guidelines)

docs/06-installation/02-installation-guides/05-installing-in-demo-mode-on-windows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,5 @@ To get the full and up-to-date list of commands, run `docker/sdk help`.
118118
* [Configuring debugging](../../02-development/05-configuring-debugging.md)
119119
* [Deploy file reference - 1.0](../../07-deploy-file/02-deploy.file.reference.v1.md)
120120
* [Configuring services](../../06-configuring-services.md)
121-
* [Setting up a self-signed SSL certificate](https://documentation.spryker.com/docs/setting-up-a-self-signed-ssl-certificate)
121+
* [Setting up a self-signed SSL certificate](https://docs.spryker.com/docs/dg/dev/set-up-spryker-locally/configure-after-installing/set-up-a-self-signed-ssl-certificate.html)
122122
* [Additional DevOPS guidelines](https://documentation.spryker.com/docs/additional-devops-guidelines)

docs/06-installation/02-installation-guides/06-integrating-the-docker-sdk-into-existing-projects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,5 @@ To get the full and up-to-date list of commands, run `docker/sdk help`.
113113
* [Configuring debugging](../../02-development/05-configuring-debugging.md)
114114
* [Deploy File Reference - 1.0](../../07-deploy-file/02-deploy.file.reference.v1.md)
115115
* [Configuring services](../../06-configuring-services.md)
116-
* [Setting up a self-signed SSL certificate](https://documentation.spryker.com/docs/setting-up-a-self-signed-ssl-certificate)
116+
* [Setting up a self-signed SSL certificate](https://docs.spryker.com/docs/dg/dev/set-up-spryker-locally/configure-after-installing/set-up-a-self-signed-ssl-certificate.html)
117117
* [Additional DevOPS guidelines](https://documentation.spryker.com/docs/additional-devops-guidelines)

generator/openssl/default.crt

Lines changed: 0 additions & 20 deletions
This file was deleted.

generator/openssl/default.key

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)