This repository has been archived by the owner on Mar 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
56 lines (47 loc) · 1.47 KB
/
Dockerfile
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM alpine:latest as builder
COPY cpanfile /
ENV EV_EXTRA_DEFS -DEV_NO_ATFORK
RUN apk update && \
apk add perl \
perl-io-socket-ssl \
perl-dbd-pg \
perl-dev \
perl-dbd-mysql \
g++ \
make \
wget \
curl \
git \
&& curl -L https://cpanmin.us | perl - App::cpanminus \
&& cpanm --installdeps --notest . \
&& rm -rf /root/.cpanm/* /usr/local/share/man/*
FROM builder as bibspace-base
RUN mkdir -p BibSpace
COPY bin/ /BibSpace/bin
COPY fixture/ /BibSpace/fixture
COPY lib/ /BibSpace/lib
COPY util/ /BibSpace/util
COPY t/ /BibSpace/t
# Migration 0.5.0 -> 0.5.0-docker
RUN mkdir -p /BibSpace/json_data \
; [ -f bibspace_preferences.json ] \
&& cp bibspace_preferences.json /BibSpace/json_data/bibspace_preferences.json \
; [ -f bibspace_stats.json ] \
&& cp bibspace_stats.json /BibSpace/json_data/bibspace_stats.json \
; exit 0
ENV EV_EXTRA_DEFS -DEV_NO_ATFORK
ENV TZ=Europe/Berlin
RUN apk update \
&& apk add tzdata \
&& mkdir -p /config/etc \
&& cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime \
&& rm -rf /var/cache/apk/*
RUN echo "Europe/Berlin" > /config/etc/timezone
LABEL version="0.6.0"
EXPOSE 8083
HEALTHCHECK --interval=30s --timeout=15s CMD curl --fail http://localhost:8083/system_status || exit 1
FROM bibspace-base as bibspace
# For production
CMD ["BibSpace/bin/bibspace", "daemon", "-m", "production", "-l", "http://*:8083"]
# For development
# CMD ["morbo", "BibSpace/bin/bibspace", "-l", "http://*:8083"]