Cleanup, added Funko object, support funko metadata
This commit is contained in:
21
runtimes/crystal/Dockerfile
Normal file
21
runtimes/crystal/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine as build
|
||||
|
||||
RUN apk update && apk upgrade && apk add crystal shards openssl-dev zlib-dev && apk cache clean
|
||||
|
||||
WORKDIR /home/app
|
||||
|
||||
COPY shard.yml *.cr ./
|
||||
RUN shards install
|
||||
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 && apk cache clean
|
||||
RUN addgroup -S app && adduser app -S -G app
|
||||
|
||||
WORKDIR /home/app
|
||||
USER app
|
||||
|
||||
COPY --from=build /home/app/bin/function .
|
||||
|
||||
CMD ["./function"]
|
4
runtimes/crystal/main.cr
Normal file
4
runtimes/crystal/main.cr
Normal file
@ -0,0 +1,4 @@
|
||||
require "kemal"
|
||||
require "./function.cr"
|
||||
|
||||
Kemal.run
|
15
runtimes/crystal/shard.yml
Normal file
15
runtimes/crystal/shard.yml
Normal file
@ -0,0 +1,15 @@
|
||||
name: function
|
||||
version: 0.1.0
|
||||
|
||||
targets:
|
||||
function:
|
||||
main: main.cr
|
||||
|
||||
dependencies:
|
||||
kemal:
|
||||
github: kemalcr/kemal
|
||||
|
||||
# development_dependencies:
|
||||
# webmock:
|
||||
# github: manastech/webmock.cr
|
||||
|
Reference in New Issue
Block a user