Tinyproxy + faaso-daemon docker image using multirun
This commit is contained in:
parent
e60bc2dd28
commit
0f297e9714
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine as build
|
||||
RUN apk add crystal shards yaml-dev openssl-dev zlib-dev
|
||||
RUN addgroup -S app && adduser app -S -G app
|
||||
WORKDIR /home/app
|
||||
COPY shard.yml ./
|
||||
RUN mkdir src/
|
||||
COPY src/* src/
|
||||
RUN shards install
|
||||
RUN shards build
|
||||
|
||||
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine as ship
|
||||
RUN apk add tinyproxy multirun openssl zlib yaml pcre2 gc libevent libgcc
|
||||
|
||||
# Unprivileged user
|
||||
RUN addgroup -S app && adduser app -S -G app
|
||||
WORKDIR /home/app
|
||||
|
||||
COPY tinyproxy/tinyproxy.conf ./
|
||||
COPY --from=build /home/app/bin/faaso-daemon ./
|
||||
|
||||
CMD ["/usr/bin/multirun", "./faaso-daemon", "tinyproxy -d -c tinyproxy.conf"]
|
16
shard.lock
16
shard.lock
@ -1,5 +1,9 @@
|
||||
version: 2.0
|
||||
shards:
|
||||
backtracer:
|
||||
git: https://github.com/sija/backtracer.cr.git
|
||||
version: 1.2.2
|
||||
|
||||
commander:
|
||||
git: https://github.com/mrrooijen/commander.git
|
||||
version: 0.4.0
|
||||
@ -12,7 +16,19 @@ shards:
|
||||
git: https://github.com/ralsina/docr.git
|
||||
version: 0.1.1+git.commit.18f15cc7111b1d0c63347c7cca07aee9ec87a7a8
|
||||
|
||||
exception_page:
|
||||
git: https://github.com/crystal-loot/exception_page.git
|
||||
version: 0.4.1
|
||||
|
||||
kemal:
|
||||
git: https://github.com/kemalcr/kemal.git
|
||||
version: 1.5.0
|
||||
|
||||
kiwi:
|
||||
git: https://github.com/ralsina/kiwi.git
|
||||
version: 0.1.0+git.commit.65059b87771238593a28b2b8b9fdf77d8e2b9e89
|
||||
|
||||
radix:
|
||||
git: https://github.com/luislavena/radix.git
|
||||
version: 0.4.1
|
||||
|
||||
|
@ -7,6 +7,8 @@ authors:
|
||||
targets:
|
||||
faaso:
|
||||
main: src/main.cr
|
||||
faaso-daemon:
|
||||
main: src/daemon.cr
|
||||
|
||||
crystal: '>= 1.12.2'
|
||||
|
||||
@ -21,4 +23,6 @@ dependencies:
|
||||
github: mrrooijen/commander
|
||||
kiwi:
|
||||
github: ralsina/kiwi
|
||||
branch: master
|
||||
branch: master
|
||||
kemal:
|
||||
github: kemalcr/kemal
|
@ -3,5 +3,5 @@ Listen 0.0.0.0
|
||||
Timeout 600
|
||||
Allow 0.0.0.0/0
|
||||
ReverseOnly Yes
|
||||
ReversePath "/faaso/hello" "http://localhost:32783"
|
||||
ReversePath "/faaso/hello/" "http://hello:3000/"
|
||||
ReverseMagic Yes
|
||||
|
Loading…
Reference in New Issue
Block a user