Skip to content

Commit e91e514

Browse files
committed
Upgrade to latest gitit with cabal and add RTS support
1 parent 68a7ab8 commit e91e514

2 files changed

Lines changed: 40 additions & 8 deletions

File tree

Dockerfile

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,46 @@
1-
## Dockerfile for gitit
1+
#
2+
# Dockerfile
3+
#
24

3-
# Use debian 9 (stretch) for gitit 0.12
4-
FROM debian:9
5+
FROM debian:8
56
LABEL maintainer="Yang Zhang <[email protected]>"
67

7-
# Add gitit packages
88
ENV DEBIAN_FRONTEND noninteractive
9-
RUN apt-get update && apt-get install -y \
10-
locales git pandoc pandoc-data gitit libghc-filestore-data \
11-
supervisor gosu
9+
# Install basic tools which will not be removed
10+
# The following command installs custom ghc and use cabal to install gitit
11+
# into system path. The building tools and intermediate haskell libraries are
12+
# then removed to keep the image slim. The custom ghc installation is copied
13+
# from library/haskell. We do not inherite from library/haskell because the
14+
# final image would become very large (2.4G).
15+
ENV ORIG_PATH $PATH
16+
ENV PATH /opt/cabal/1.24/bin:/opt/ghc/8.0.2/bin:/opt/happy/1.19.5/bin:/opt/alex/3.1.7/bin:$PATH
17+
ENV LANG C
18+
RUN apt-get update && \
19+
apt-get install -y --no-install-recommends apt-utils && \
20+
echo 'deb http://ftp.debian.org/debian jessie-backports main' \
21+
>/etc/apt/sources.list.d/backports.list && \
22+
echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu trusty main' \
23+
>/etc/apt/sources.list.d/ghc.list && \
24+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286 && \
25+
apt-get update && \
26+
apt-get install -y --no-install-recommends \
27+
git locales supervisor gosu \
28+
cabal-install-1.24 ghc-8.0.2 happy-1.19.5 alex-3.1.7 \
29+
zlib1g-dev libtinfo-dev libsqlite3-0 libsqlite3-dev \
30+
ca-certificates g++ && \
31+
cabal update && cabal install --prefix=/usr/local gitit && \
32+
cabal install --reinstall --prefix=/usr/local --ghc-options="-rtsopts" \
33+
gitit && \
34+
apt-get purge -y --auto-remove \
35+
cabal-install-1.24 ghc-8.0.2 happy-1.19.5 alex-3.1.7 \
36+
zlib1g-dev libtinfo-dev libsqlite3-dev ca-certificates g++ && \
37+
rm -rf /root/.cabal /root/.stack /root/.ghc && \
38+
rm -rf /var/lib/apt/lists/* && \
39+
rm -rf /usr/local/bin/*.md /usr/local/bin/doc && \
40+
rm -rf /usr/local/bin/pandoc /usr/local/bin/yaml2json \
41+
/usr/local/bin/json2yaml && \
42+
rm -rf /usr/local/lib/x86_64-linux-ghc-8.0.2
43+
ENV PATH /usr/local/bin:$ORIG_PATH
1244

1345
# Use an UTF-8 locale
1446
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \

utils/sample.supervisord.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
1111

1212
[program:gitit]
1313
directory = /data/gitit
14-
command = gitit -f gitit.conf
14+
command = gitit -f gitit.conf +RTS -I0 -RTS
1515
stdout_logfile = /data/gitit/logs-%(program_name)s.log
1616
stderr_logfile = /data/gitit/logs-%(program_name)s.log
1717
autostart = true

0 commit comments

Comments
 (0)