Skip to content

Commit

Permalink
Symlink vast certificate, no copy
Browse files Browse the repository at this point in the history
  • Loading branch information
robballantyne committed Aug 5, 2024
1 parent 113e874 commit b75c25d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions build/COPY_ROOT_0/opt/ai-dock/bin/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function init_main() {
init_create_logfiles
init_set_ssh_keys
init_direct_address
init_set_web_credentials
init_set_web_config
init_set_workspace
init_count_gpus
init_count_quicktunnels
Expand Down Expand Up @@ -106,7 +106,7 @@ function init_set_ssh_keys() {
fi
}

init_set_web_credentials() {
init_set_web_config() {
# Handle cloud provider auto login

if [[ -z $CADDY_AUTH_COOKIE_NAME ]]; then
Expand All @@ -123,10 +123,7 @@ init_set_web_credentials() {
if [[ -z $WEB_PASSWORD || $WEB_PASSWORD == "password" ]]; then
export WEB_PASSWORD="${OPEN_BUTTON_TOKEN}"
fi
fi

# Vast.ai TLS certificates
if [[ -f /etc/instance.crt && -f /etc/instance.key ]]; then
# Vast.ai TLS certificates
rm -f /opt/caddy/tls/container.*
ln -sf /etc/instance.crt /opt/caddy/tls/container.crt
ln -sf /etc/instance.key /opt/caddy/tls/container.key
Expand Down

0 comments on commit b75c25d

Please sign in to comment.