Compare commits
8 Commits
f14a8d1c39
...
379b4e2472
Author | SHA1 | Date | |
---|---|---|---|
379b4e2472 | |||
7104403585 | |||
47fcdda2d4 | |||
68c9960a58 | |||
52e461ec80 | |||
bcbf74bbaa | |||
bbe934f2b8 | |||
8228ea3233 |
6
TODO.md
6
TODO.md
@ -22,13 +22,17 @@
|
||||
* ✅ Make server take options from file
|
||||
* ✅ Make server take options from environment
|
||||
* ✅ Make server password configurable
|
||||
* admin/admin auth client side
|
||||
* admin/admin auth client side [WIP, broke everything]
|
||||
* `faaso login` is not working properly yet with proxy
|
||||
* CD for binaries and images for at least arm64/x86
|
||||
* Multi-container docker logs [faaso logs -f FUNKO]
|
||||
* ✅ Direct error and above to stderr, others to stdout,
|
||||
while keeping logging level configurable
|
||||
* ✅ Fix proxy reload / Make it reload on file changes
|
||||
* Implement `faaso help command`
|
||||
* Fix `export examples/hello_crystal` it has a `template/`
|
||||
* Implement zero-downtime rollout
|
||||
* Cleanup `tmp/` after use unless `DEBUG` is set
|
||||
|
||||
# Things to do but not before release
|
||||
|
||||
|
@ -1 +1 @@
|
||||
password: admin
|
||||
password: adminfoo
|
||||
|
8
config/funkos
Normal file
8
config/funkos
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
handle_path /faaso/hello/* {
|
||||
reverse_proxy /* http://faaso-hello-9zth8p:3000 {
|
||||
health_uri /ping
|
||||
fail_duration 30s
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,11 @@
|
||||
# README
|
||||
# Readme for Hello_crystal
|
||||
|
||||
This is the readme for people trying to *use* this runtime.
|
||||
This is a funko using the Crystal runtime for [FaaSO](https://git.ralsina.me/ralsina/faaso)
|
||||
|
||||
## What is Hello_crystal
|
||||
|
||||
Write here what it is
|
||||
|
||||
## How to use Hello_crystal
|
||||
|
||||
And so on.
|
14
examples/hello_crystal/shard.yml
Normal file
14
examples/hello_crystal/shard.yml
Normal file
@ -0,0 +1,14 @@
|
||||
name: hello_crystal
|
||||
version: 0.1.0
|
||||
|
||||
targets:
|
||||
funko:
|
||||
main: main.cr
|
||||
|
||||
dependencies:
|
||||
kemal:
|
||||
github: kemalcr/kemal
|
||||
|
||||
# development_dependencies:
|
||||
# webmock:
|
||||
# github: manastech/webmock.cr
|
@ -10,7 +10,7 @@ RUN shards build --release
|
||||
RUN strip bin/*
|
||||
|
||||
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine as ship
|
||||
RUN apk update && apk upgrade && apk add openssl pcre2 libgcc gc libevent curl {{ ship_packages | join " " }} && apk cache clean
|
||||
RUN apk update && apk upgrade && apk add pcre2 libgcc gc libevent curl {{ ship_packages | join " " }} && apk cache clean
|
||||
RUN addgroup -S app && adduser app -S -G app
|
||||
|
||||
WORKDIR /home/app
|
||||
@ -19,4 +19,4 @@ USER app
|
||||
COPY --from=build /home/app/bin/funko .
|
||||
|
||||
CMD ["./funko"]
|
||||
HEALTHCHECK {{ healthcheck_options }} CMD {{ healthcheck_command }}
|
||||
HEALTHCHECK {{ healthcheck_options }} CMD {{ healthcheck_command }}
|
||||
|
@ -127,7 +127,7 @@ module Funko
|
||||
|
||||
# Helper to run faaso locally and respond via env
|
||||
def run_faaso(args : Array(String), env) : Bool
|
||||
Log.info { "Running faaso [#{args.join(", ")}, -l]" }
|
||||
Log.info { "Running faaso [#{args.join(", ")}, -l, 2>&1]" }
|
||||
Process.run(
|
||||
command: "faaso",
|
||||
args: args + ["-l", "2>&1"], # Always local in the server
|
||||
|
@ -99,7 +99,8 @@ module Funko
|
||||
sleep 0.1.seconds
|
||||
}
|
||||
else
|
||||
containers.select { |container| container.@state == "running" }.sort! { |i, j|
|
||||
# Sort them older to newer, so we stop the oldest
|
||||
containers.sort! { |i, j|
|
||||
i.@created <=> j.@created
|
||||
}.each { |container|
|
||||
Log.info { "Removing instance" }
|
||||
|
Loading…
Reference in New Issue
Block a user