Cleanup, added Funko object, support funko metadata

This commit is contained in:
2024-06-29 12:22:59 -03:00
parent f5d1320add
commit 4b6985d3f4
9 changed files with 83 additions and 16 deletions

View 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
View File

@ -0,0 +1,4 @@
require "kemal"
require "./function.cr"
Kemal.run

View 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