Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
FROM alpine:latest
FROM debian:buster-slim
MAINTAINER Peter Grace <pete.grace@gmail.com>

RUN apk --update add apache2 apache2-mod-wsgi python2 py-pip bash git mercurial \
&& apk add -t builddev python2-dev build-base \
&& pip install --upgrade pip \
&& pip install PasteScript \
&& pip install --trusted-host pypi.python.org kallithea \
&& apk del builddev \
&& mkdir -p /opt/kallithea/data \
&& mkdir -p /opt/kallithea/repos
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN apt-get -y install libapache2-mod-wsgi-py3 git mercurial python3-pip npm
RUN apt-get -y install \
python3-pastescript python3-sqlalchemy python3-bcrypt python3-mako \
python3-decorator python3-waitress python3-bleach python3-dulwich \
python-ldap python3-click python3-alembic
RUN pip3 install \
mercurial backlash gearbox WebHelpers2 paginate-sqlalchemy paginate ipaddr \
gearbox TurboGears2 tgext.routes celery beaker
RUN pip3 install kallithea
RUN npm install npm@latest -g
RUN mkdir -p /opt/kallithea/data \
&& mkdir -p /opt/kallithea/repos

ADD ./entrypoint.sh /entrypoint.sh

Expand Down
13 changes: 8 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#!/bin/bash
if [ ! -f "/opt/kallithea/production.ini" ]
then
paster make-config Kallithea /opt/kallithea/production.ini
sed -i 's#127.0.0.1#0.0.0.0#g' /opt/kallithea/production.ini
kallithea-cli config-create /opt/kallithea/production.ini host=0.0.0.0
fi
if [ ! -f "/opt/kallithea/data/kallithea.db" ]
if [ ! -f "/opt/kallithea/kallithea.db" ]
then
paster setup-db -q --user=admin --email=admin@admin.com --password=Administrator --repos=/opt/kallithea/repos --force-yes /opt/kallithea/production.ini
kallithea-cli db-create \
--user=admin --email=admin@admin.com --password=Administrator \
--repos=/opt/kallithea/repos --force-yes \
-c /opt/kallithea/production.ini
kallithea-cli front-end-build
fi
paster serve /opt/kallithea/production.ini
gearbox serve -c /opt/kallithea/production.ini