Skip to content

Commit

Permalink
clone env
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Edouard Barrault committed Nov 6, 2024
1 parent 034a514 commit aa49740
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ resource "null_resource" "setup_services" {
"aws_access_key_id = ${var.scaleway_access_key}",
"aws_secret_access_key = ${var.scaleway_secret_key}",
"EOF",
"\necho '${var.scaleway_awscli_config}' >> ~/.aws/config",
"echo '${var.scaleway_awscli_config}'",
"echo '${var.scaleway_awscli_config}' >> ~/.aws/config",

# Import data
"\necho 'Importing data from bucket ...'",
Expand Down Expand Up @@ -201,13 +202,16 @@ resource "null_resource" "setup_services" {
# "sudo chown -R clickhouse:clickhouse ${local.data_directory}",

# Clone and setup application
"\necho 'Installing Typescript components ...'",
"\necho 'Clone and setup application ...'",
"sudo mkdir -p /opt/app",
"sudo chown -R ${var.scaleway_server_user}:${var.scaleway_server_user} /opt/app",
"CLONE_URI=https://${var.github_token}@github.com/${var.github_repo_name}.git",
"CLONE_FLAGS='--branch ${var.github_repo_branch} --single-branch [email protected]:${var.github_repo_name}.git'",
"git clone $CLONE_URI $CLONE_FLAGS /opt/app",
# "git clone https://${var.github_token}@github.com/${var.github_repo_name}.git .",
"git clone https://${var.github_token}@github.com/${var.github_repo_name}.git \\n",
" --branch ${var.github_repo_branch} \\n",
" --single-branch [email protected]:${var.github_repo_name}.git /opt/app",
# "git clone https://${var.github_token}@github.com/${var.github_repo_name}.git \",
# " --branch ${var.github_repo_branch} \",
# " --single-branch [email protected]:${var.github_repo_name}.git /opt/app",
"npm install --no-package-lock --no-save /opt/app/src",
"ln -s /opt/app/config /opt/app/dist/config",

Expand Down

0 comments on commit aa49740

Please sign in to comment.