Skip to content
This repository was archived by the owner on Jul 3, 2023. It is now read-only.
Merged
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
30 changes: 30 additions & 0 deletions CloudKitty/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM python:3.7-slim-buster

RUN apt-get update \
&& apt-get install --no-install-recommends -y \
apache2 \
libapache2-mod-wsgi-py3 \
gcc \
python3-dev \
&& pip install cloudkitty \
&& apt-get purge -y \
gcc \
python3-dev \
&& apt-get clean -y \
&& rm -rf /var/cache/apt \
&& rm -rf /var/lib/apt/lists/*

RUN useradd cloudkitty --create-home --home-dir /home/cloudkitty \
&& mkdir -p /var/www/cloudkitty \
&& cp /usr/local/lib/python3.7/site-packages/cloudkitty/api/app.wsgi /var/www/cloudkitty \
&& chown -R cloudkitty:cloudkitty /var/www/cloudkitty \
&& ln -sf /dev/stdout /var/log/apache2/cloudkitty_error.log \
&& ln -sf /dev/stdout /var/log/apache2/cloudkitty_access.log \
&& ln -sf /dev/stdout /var/log/apache2/error.log \
&& ln -sf /dev/stdout /var/log/apache2/access.log

COPY apache_cloudkitty.conf /etc/apache2/sites-enabled/cloudkitty.conf

COPY run_apache.sh /root/run_apache.sh

CMD ["/root/run_apache.sh"]
15 changes: 15 additions & 0 deletions CloudKitty/api/apache_cloudkitty.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Listen 8889

<VirtualHost *:8889>
WSGIDaemonProcess cloudkitty-api processes=2 threads=10 user=cloudkitty display-name=%{GROUP}
WSGIProcessGroup cloudkitty-api
WSGIScriptAlias / /var/www/cloudkitty/app.wsgi
WSGIApplicationGroup %{GLOBAL}
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog /var/log/apache2/cloudkitty_error.log
CustomLog /var/log/apache2/cloudkitty_access.log combined
</VirtualHost>

WSGISocketPrefix /var/run/apache2
4 changes: 4 additions & 0 deletions CloudKitty/api/run_apache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash -x

rm -f "/var/run/apache2/apache2.pid"
exec apache2ctl -DFOREGROUND
5 changes: 5 additions & 0 deletions CloudKitty/processor/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM python:3.7-buster

RUN pip install cloudkitty

CMD [ "cloudkitty-processor" ]
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# dockerfiles

This repository contains the Dockerfiles for Objectif Libre's official images.

## CloudKitty

### api

Contains the Dockerfile for CloudKitty's API and its dependencies.

### processor

Contains the Dockerfile for CloudKitty's processor.