From b3fd7670efe167fd99c8ab4db229695c1e081857 Mon Sep 17 00:00:00 2001 From: Nathan Rodet <nrodet@grandlyon.com> Date: Thu, 22 Dec 2022 15:40:39 +0100 Subject: [PATCH] Added configuration --- README.md | 3 +-- server-scripts/cloud-init.yml | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 161a03a..4fe84d2 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,7 @@ They will be used in Terraform for configuration and securing credentials. After this, Gitlab CI will initiate Terraform, which create infrastructure matching the configuration. While deploying resources, especially instances, Terraform will provide the cloud-init.yml script so it can be executed after boot and configure the instances. -Infrastructure is ready, which the script runned at boot 3 services are running : atrium which serve as a reverse-proxy, code-server and webtop. -User just +Infrastructure is ready, the cloud-init script will run at boot 3 services and leave 3 services running : atrium which serve as a reverse-proxy, code-server and webtop. ## Setup Terraform Locally diff --git a/server-scripts/cloud-init.yml b/server-scripts/cloud-init.yml index 57b96d3..51f0556 100644 --- a/server-scripts/cloud-init.yml +++ b/server-scripts/cloud-init.yml @@ -47,7 +47,8 @@ runcmd: - "curl -fsSL https://get.docker.com -o get-docker.sh" - "sh get-docker.sh" # Install Atrium - - "mkdir -p /root/app/data/letsencrypt_cache" + - "mkdir -p /root/app/data && mkdir -p /root/app/letsencrypt_cache" + - 'chown -Rf 1000:1000 root/data root/letsencrypt_cache' - 'sed -i "s/%atrium_hostname%/$(scw-userdata atrium_hostname)/g" /root/atrium.yaml' - 'sed -i "s/%atrium_letsencrypt_email%/$(scw-userdata atrium_letsencrypt_email)/g" /root/atrium.yaml' - 'sed -i "s/%atrium_count_index%/$(scw-userdata atrium_count_index)/g" /root/atrium.yaml' -- GitLab