make non-embedded runtimes work properly

This commit is contained in:
Roberto Alsina 2024-07-05 15:58:33 -03:00
parent 1a48ffbf22
commit 1d2b44a3ba
7 changed files with 11 additions and 10 deletions

View File

@ -6,7 +6,7 @@
http://*:8888 { http://*:8888 {
basicauth /admin/* { basicauth /admin/* {
admin {$HTTP_BASIC_AUTH_PASSWORD} admin {$FAASO_PASSWORD}
} }
handle_path /admin/terminal/* { handle_path /admin/terminal/* {

View File

@ -4,7 +4,7 @@ build: shard.yml $(wildcard src/**/*) $(runtimes/**/*)
proxy: build proxy: build
docker build . -t faaso-proxy docker build . -t faaso-proxy
start-proxy: start-proxy:
docker run --name faaso-proxy-one --rm --network=faaso-net --env-file=proxy.env -e FAASO_SECRET_PATH=${PWD}/secrets -v /var/run/docker.sock:/var/run/docker.sock -v secrets:/home/app/secrets -p 8888:8888 faaso-proxy docker run --name faaso-proxy-one --rm --network=faaso-net --env-file=proxy.env -e FAASO_SECRET_PATH=${PWD}/secrets -v /var/run/docker.sock:/var/run/docker.sock -v ${PWD}/secrets:/home/app/secrets -p 8888:8888 faaso-proxy
.PHONY: build proxy-image start-proxy .PHONY: build proxy-image start-proxy

View File

@ -1 +1 @@
HTTP_BASIC_AUTH_PASSWORD=$2a$14$C35905PxPzICAZKc/O9jYOS7ipZNPBtrndja8Yu3bvs/UujckryHS FAASO_PASSWORD=$2a$14$C35905PxPzICAZKc/O9jYOS7ipZNPBtrndja8Yu3bvs/UujckryHS

View File

@ -1,2 +1,2 @@
name: {{ name }} name: {{ name }}
runtime: crystal runtime: {{ runtime }}

View File

@ -25,7 +25,8 @@ module Faaso
template_base, template_base,
template_files, template_files,
folder, folder,
{"name" => Path[folder].basename} {"name" => Path[folder].basename,
"runtime" => runtime}
) )
0 0
end end

View File

@ -85,3 +85,8 @@ when .fetch("status", false)
end end
exit(status) exit(status)
# Embed runtimes in the faaso binary using rucksack
{% for name in `find ./runtimes -type f`.split('\n') %}
rucksack({{name}})
{% end %}

View File

@ -91,8 +91,3 @@ module Runtime
end end
end end
end end
# Embed runtimes in the binary using rucksack
{% for name in `find ./runtimes -type f`.split('\n') %}
rucksack({{name}})
{% end %}