Skip to content
Snippets Groups Projects
Commit 45a41483 authored by Nathan Rodet's avatar Nathan Rodet
Browse files

Added configuration

parent 17ea3e90
No related branches found
No related tags found
6 merge requests!6End of development,!5Develop,!4End of development,!3Develop,!2hot-fix: change readme.md,!1Develop
Pipeline #49211 passed
hostname: $(scw-userdata atrium_hostname)
debug_mode: false
letsencrypt_email: $(scw_userdata atrium_letsencrypt_email)
apps: # optional : applications served by atrium
- id: 1
name: Code
icon: web_asset
color: 4292030255
is_proxy: true
host: "code-$(scw_userdata atrium_count_index)"
target: $(scw_userdata atrium_private_ip):8080
- id: 2
name: Desktop
icon: web_asset
color: 4292030255
is_proxy: true
host: "desktop-$(scw_userdata atrium_count_index)"
target: $(scw_userdata atrium_private_ip):8081
\ No newline at end of file
cat<<EOF >> ./root/atrium.yaml
hostname: $(scw-userdata atrium_hostname)
debug_mode: false
letsencrypt_email: $(scw_userdata atrium_letsencrypt_email)
apps: # optional : applications served by atrium
- id: 1
name: Code
icon: web_asset
color: 4292030255
is_proxy: true
host: "code-$(scw_userdata atrium_count_index)"
target: $(scw_userdata atrium_private_ip):8080
- id: 2
name: Desktop
icon: web_asset
color: 4292030255
is_proxy: true
host: "desktop-$(scw_userdata atrium_count_index)"
target: $(scw_userdata atrium_private_ip):8081
EOF
......@@ -23,7 +23,6 @@ write_files:
is_proxy: true
host: "code-%atrium_count_index%"
target: %atrium_private_ip%:8080
apps: # optional : applications served by atrium
- id: 2
name: Desktop
icon: web_asset
......@@ -54,13 +53,13 @@ runcmd:
- 'sed -i "s/%atrium_count_index%/$(scw-userdata atrium_count_index)/g" /root/atrium.yaml'
- 'sed -i "s/%atrium_private_ip%/$(scw-userdata atrium_private_ip)/g" /root/atrium.yaml'
- "cp -f /root/atrium.yaml /root/app/atrium.yaml"
# Run Atrium Container
- "docker run -d --name atrium --net=host -v /root/app/atrium.yaml:/app/atrium.yaml -v /root/app/data/GeoLite2-City.mmdb:/app/GeoLite2-City.mmdb -v /root/app/data/letsencrypt_cache:/app/letsencrypt_cache -v /root/app/data:/app/data nicolaspernoud/atrium:latest"
# Install Code Server
- "curl -fsSL https://code-server.dev/install.sh | sh"
- "mkdir -p /root/.config/code-server/"
- 'sed -i "s/%user_password%/$(scw-userdata user_password)/g" /root/config.yaml'
- "cp -f /root/config.yaml /root/.config/code-server/config.yaml"
# Run Atrium Container
- "docker run -d --name atrium --net=host -v /root/app/atrium.yaml:/app/atrium.yaml -v /root/app/data/GeoLite2-City.mmdb:/app/GeoLite2-City.mmdb -v /root/app/data/letsencrypt_cache:/app/letsencrypt_cache -v /root/app/data:/app/data nicolaspernoud/atrium:latest"
# Run Code Server
- "systemctl enable --now code-server@$USER"
# Run Webtop Container
......
......@@ -88,7 +88,7 @@ resource "scaleway_instance_server" "user_instance_server" {
atrium_hostname = scaleway_domain_record.host_subdomain_record[count.index].name
atrium_letsencrypt_email = var.LETSENCRYPT_EMAIL
user_password = var.USER_PASSWORD
cloud-init = file("cloud-init.yml")
cloud-init = file("../server-scripts/cloud-init.yml")
}
depends_on = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment