ctucx.git: oeffisearch

[nimlang] fast and simple tripplanner

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
FROM nimlang/nim:latest-alpine as build

COPY ./src                /app
COPY ./docker/config.nims /app/config.nims

WORKDIR /app

ENV LIBRESSLVER=3.0.2

RUN apk upgrade --update && \
    apk add --no-cache --no-progress openssl-dev pcre-dev file make tzdata && \
    nim installLibreSsl && \
    ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime

RUN nim musl -d:release -d:libressl oeffisearch.nim


FROM scratch

COPY --from=build /app/oeffisearch    /oeffisearch
COPY --from=build /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=build /etc/localtime      /etc/localtime

VOLUME ["/data"]

WORKDIR /

ENV CACHE_PATH=/data

EXPOSE 8081

CMD ["/oeffisearch"]