This commit is contained in:
Roberto Alsina 2024-06-29 20:38:34 -03:00
parent 3d529019e6
commit 4bb5ab631e
3 changed files with 13 additions and 4 deletions

View File

@ -6,7 +6,8 @@ COPY shard.yml ./
RUN mkdir src/
COPY src/* src/
RUN shards install
RUN shards build
RUN shards build -d --error-trace
RUN strip bin/faaso-daemon
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine as ship
RUN apk add tinyproxy multirun openssl zlib yaml pcre2 gc libevent libgcc
@ -15,7 +16,7 @@ RUN apk add tinyproxy multirun openssl zlib yaml pcre2 gc libevent libgcc
RUN addgroup -S app && adduser app -S -G app
WORKDIR /home/app
COPY tinyproxy/tinyproxy.conf ./
COPY tinyproxy.conf ./
COPY --from=build /home/app/bin/faaso-daemon ./
CMD ["/usr/bin/multirun", "./faaso-daemon", "tinyproxy -d -c tinyproxy.conf"]

View File

@ -24,9 +24,10 @@ ReverseMagic Yes
ReversePath "/admin/" "http://127.0.0.1:3000/"
) + funkos.map { |funko| %(ReversePath "/faaso/#{funko}/" "http://#{funko}:3000/") }.join("\n")
File.open("/etc/tinyproxy/tinyproxy.conf", "w") do |file|
File.open("tinyproxy.conf", "w") do |file|
file << proxy_config
end
proxy_config
end
Kemal.run

7
tinyproxy.conf Normal file
View File

@ -0,0 +1,7 @@
Port 8888
Listen 0.0.0.0
Timeout 600
Allow 0.0.0.0/0
ReverseOnly Yes
ReverseMagic Yes
ReversePath "/admin/" "http://127.0.0.1:3000/"