Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy certs to /root/kubeplay/config/compose ? #33

Open
shiqinfeng1 opened this issue Sep 23, 2021 · 0 comments
Open

Copy certs to /root/kubeplay/config/compose ? #33

shiqinfeng1 opened this issue Sep 23, 2021 · 0 comments

Comments

@shiqinfeng1
Copy link

好像没有复制证书到这个目录吧?

common::generate_domain_certs(){
  if [[ ${GENERATE_DOMAIN_CRT} == "true" ]]; then
    local DOMAIN=$(echo ${REGISTRY_DOMAIN} | sed 's/[^.]*./*./')
    rm -rf ${CERTS_DIR} ${RESOURCES_NGINX_DIR}/certs
    mkdir -p ${CERTS_DIR} ${RESOURCES_NGINX_DIR}/certs
    infolog "Generating TLS cert for domain: ${REGISTRY_DOMAIN}"
    CAROOT=${CERTS_DIR} mkcert -install
    CAROOT=${CERTS_DIR} mkcert -key-file ${CERTS_DIR}/domain.key -cert-file ${CERTS_DIR}/domain.crt ${REGISTRY_DOMAIN} ${DOMAIN} 

    # Copy domain.crt, domain.key to nginx certs directory
    infolog "Copy certs to ${COMPOSE_CONFIG_DIR}"
    cp -f ${CERTS_DIR}/rootCA.pem ${RESOURCES_NGINX_DIR}/certs/rootCA.crt
  fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant