Skip to content
This repository was archived by the owner on Jul 3, 2023. It is now read-only.

Commit 25aeeb9

Browse files
committed
Add Dockerfiles for CloudKitty
Added the Dockerfile for CloudKitty api and its dependencies. Also added the Dockerfile for CloudKitty processor and updated the README to include the Dockerfiles documentation.
1 parent 2e4827e commit 25aeeb9

File tree

5 files changed

+64
-0
lines changed

5 files changed

+64
-0
lines changed

CloudKitty/api/Dockerfile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
FROM python:3.7-slim-buster
2+
3+
RUN apt-get update \
4+
&& apt-get install --no-install-recommends -y \
5+
apache2 \
6+
libapache2-mod-wsgi-py3 \
7+
gcc \
8+
python3-dev \
9+
&& pip install cloudkitty \
10+
&& apt-get purge -y \
11+
gcc \
12+
python3-dev \
13+
&& apt-get clean -y \
14+
&& rm -rf /var/cache/apt \
15+
&& rm -rf /var/lib/apt/lists/*
16+
17+
RUN useradd cloudkitty --create-home --home-dir /home/cloudkitty \
18+
&& mkdir -p /var/www/cloudkitty \
19+
&& cp /usr/local/lib/python3.7/site-packages/cloudkitty/api/app.wsgi /var/www/cloudkitty \
20+
&& chown -R cloudkitty:cloudkitty /var/www/cloudkitty \
21+
&& ln -sf /dev/stdout /var/log/apache2/cloudkitty_error.log \
22+
&& ln -sf /dev/stdout /var/log/apache2/cloudkitty_access.log \
23+
&& ln -sf /dev/stdout /var/log/apache2/error.log \
24+
&& ln -sf /dev/stdout /var/log/apache2/access.log
25+
26+
COPY apache_cloudkitty.conf /etc/apache2/sites-enabled/cloudkitty.conf
27+
28+
COPY run_apache.sh /root/run_apache.sh
29+
30+
CMD ["/root/run_apache.sh"]

CloudKitty/api/apache_cloudkitty.conf

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Listen 8889
2+
3+
<VirtualHost *:8889>
4+
WSGIDaemonProcess cloudkitty-api processes=2 threads=10 user=cloudkitty display-name=%{GROUP}
5+
WSGIProcessGroup cloudkitty-api
6+
WSGIScriptAlias / /var/www/cloudkitty/app.wsgi
7+
WSGIApplicationGroup %{GLOBAL}
8+
<IfVersion >= 2.4>
9+
ErrorLogFormat "%{cu}t %M"
10+
</IfVersion>
11+
ErrorLog /var/log/apache2/cloudkitty_error.log
12+
CustomLog /var/log/apache2/cloudkitty_access.log combined
13+
</VirtualHost>
14+
15+
WSGISocketPrefix /var/run/apache2

CloudKitty/api/run_apache.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash -x
2+
3+
rm -f "/var/run/apache2/apache2.pid"
4+
exec apache2ctl -DFOREGROUND

CloudKitty/processor/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM python:3.7-buster
2+
3+
RUN pip install cloudkitty
4+
5+
CMD [ "cloudkitty-processor" ]

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
# dockerfiles
22

33
This repository contains the Dockerfiles for Objectif Libre's official images.
4+
5+
## CloudKitty
6+
7+
### api
8+
9+
Contains the Dockerfile for CloudKitty's API and its dependencies.
10+
11+
### processor
12+
13+
Contains the Dockerfile for CloudKitty's processor.

0 commit comments

Comments
 (0)