Compare commits
No commits in common. "46ff8fc584041023fe1d403b050009c29c284782" and "6ff67e019030fb6ece9bdf6230f44ee85760c21c" have entirely different histories.
46ff8fc584
...
6ff67e0190
13
TODO.md
13
TODO.md
@ -8,23 +8,22 @@
|
|||||||
* Polish frontend UI **A LOT**
|
* Polish frontend UI **A LOT**
|
||||||
* Version checks for consistency between client/server
|
* Version checks for consistency between client/server
|
||||||
* Have 3 runtimes:
|
* Have 3 runtimes:
|
||||||
* ✅ Crystal + Kemal
|
* Crystal + Kemal ✅
|
||||||
* ✅ Python + Flask
|
* Python + Flask [WIP]
|
||||||
* ✅ Nodejs + Express
|
* Nodejs + Express
|
||||||
* Document
|
* Document
|
||||||
* How to create a runtime
|
* How to create a runtime
|
||||||
* How to create a funko
|
* How to create a funko
|
||||||
* How to setup the proxy
|
* How to setup the proxy
|
||||||
* APIs
|
* APIs
|
||||||
* Sanitize all inputs
|
* Sanitize all inputs
|
||||||
* ✅ Streaming responses in slow operations like scaling down
|
* Streaming responses in slow operations like scaling down
|
||||||
or building
|
or building
|
||||||
* Make more things configurable / remove hardcoded stuff
|
* Make more things configurable / remove hardcoded stuff
|
||||||
* CD for binaries and images for at least arm64/x86
|
* CD for binaries and images for at least arm64/x86
|
||||||
* Multi-container docker logs [faaso logs -f FUNKO]
|
* Multi-container docker logs [faaso logs -f FUNKO]
|
||||||
* Direct error and above to stderr, others to stdout, while
|
* Direct error and above to stderr, others to stdout, while keeping
|
||||||
keeping logging level configurable
|
logging level configurable
|
||||||
* Fix proxy reload / Make it reload on file changes
|
|
||||||
|
|
||||||
# Things to do but not before release
|
# Things to do but not before release
|
||||||
|
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine as build
|
|
||||||
|
|
||||||
RUN apk update && apk upgrade && apk add nodejs npm {{ ship_packages | join(" ") }} {{ devel_packages | join(" ") }} && apk cache clean
|
|
||||||
|
|
||||||
WORKDIR /home/app
|
|
||||||
|
|
||||||
COPY ./ ./
|
|
||||||
RUN npm i
|
|
||||||
|
|
||||||
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine as ship
|
|
||||||
RUN apk update && apk upgrade && apk add nodejs curl {{ ship_packages | join " " }} && apk cache clean
|
|
||||||
RUN addgroup -S app && adduser app -S -G app
|
|
||||||
|
|
||||||
WORKDIR /home/app
|
|
||||||
USER app
|
|
||||||
|
|
||||||
COPY --from=build /home/app/ .
|
|
||||||
|
|
||||||
CMD ["node", "funko.js"]
|
|
||||||
HEALTHCHECK {{ healthcheck_options }} CMD {{ healthcheck_command }}
|
|
@ -1,15 +0,0 @@
|
|||||||
const express = require('express')
|
|
||||||
const app = express()
|
|
||||||
const port = 3000
|
|
||||||
|
|
||||||
app.get('/', (req, res) => {
|
|
||||||
res.send('Hello World!')
|
|
||||||
})
|
|
||||||
|
|
||||||
app.get('/ping', (req, res) => {
|
|
||||||
res.send('OK')
|
|
||||||
})
|
|
||||||
|
|
||||||
app.listen(port, () => {
|
|
||||||
console.log(`Example funko listening on port ${port}`)
|
|
||||||
})
|
|
@ -1,2 +0,0 @@
|
|||||||
name: {{ name }}
|
|
||||||
runtime: {{ runtime }}
|
|
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "{{name}}",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"main": "funko.js",
|
|
||||||
"author": "",
|
|
||||||
"license": "MIT",
|
|
||||||
"description": "Example Funko",
|
|
||||||
"dependencies": {
|
|
||||||
"express": "^4.19.2"
|
|
||||||
}
|
|
||||||
}
|
|
@ -130,8 +130,7 @@ module Funko
|
|||||||
Log.info { "Running faaso [#{args.join(", ")}, -l]" }
|
Log.info { "Running faaso [#{args.join(", ")}, -l]" }
|
||||||
Process.run(
|
Process.run(
|
||||||
command: "faaso",
|
command: "faaso",
|
||||||
args: args + ["-l", "2>&1"], # Always local in the server
|
args: args + ["-l"], # Always local in the server
|
||||||
shell: true,
|
|
||||||
) do |process|
|
) do |process|
|
||||||
loop do
|
loop do
|
||||||
env.response.print process.output.gets(chomp: false)
|
env.response.print process.output.gets(chomp: false)
|
||||||
@ -139,6 +138,7 @@ module Funko
|
|||||||
Fiber.yield
|
Fiber.yield
|
||||||
break if process.terminated?
|
break if process.terminated?
|
||||||
end
|
end
|
||||||
|
p! process.error.peek
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
# FIXME: find a way to raise an exception on failure
|
# FIXME: find a way to raise an exception on failure
|
||||||
|
Loading…
Reference in New Issue
Block a user