ctucx.git: oeffisearch

[nimlang] fast and simple tripplanner

commit 72d26191faa8cd707f5d98ec8722d76e0126c07a
parent 90a4e70fe0d2a65505b150eceb7e0430598fd7cd
Author: ctucx <c@ctu.cx>
Date: Tue, 11 Feb 2020 18:23:45 +0100

[docker] fix timezone in container and added docker-compose file
2 files changed, 40 insertions(+), 3 deletions(-)
A
docker-compose.yml
|
34
++++++++++++++++++++++++++++++++++
M
docker/Dockerfile.oeffisearch
|
9
++++++---
diff --git a/docker-compose.yml b/docker-compose.yml
@@ -0,0 +1,33 @@
+version: "3"
+services:
+  oeffisearch-client:
+    build:
+      context: ./
+      dockerfile: ./docker/Dockerfile.nginx
+    image: oeffisearch-client
+    container_name: oeffisearch-client
+    user: "1000:1000"
+    restart: always
+    networks:
+      - oeffisearch
+    depends_on:
+      - oeffisearch
+    ports:
+      - "8081:8080"
+
+  oeffisearch:
+    build:
+      context: ./
+      dockerfile: ./docker/Dockerfile.oeffisearch
+    image: oeffisearch
+    container_name: oeffisearch
+    user: "1000:1000"
+    restart: always
+    volumes:
+      - ./data:/data
+    networks:
+      - oeffisearch
+
+networks:
+  oeffisearch:
+    driver: bridge+
\ No newline at end of file
diff --git a/docker/Dockerfile.oeffisearch b/docker/Dockerfile.oeffisearch
@@ -8,15 +8,18 @@ WORKDIR /app
 ENV LIBRESSLVER=3.0.2
 
 RUN apk upgrade --update && \
-    apk add --no-cache --no-progress openssl-dev pcre-dev file make && \
-    nim installLibreSsl
+    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 /app/oeffisearch    /oeffisearch
+COPY --from=build /usr/share/zoneinfo /usr/share/zoneinfo
+COPY --from=build /etc/localtime      /etc/localtime
 
 VOLUME ["/data"]