-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
63 lines (50 loc) · 1.81 KB
/
Copy pathDockerfile
File metadata and controls
63 lines (50 loc) · 1.81 KB
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
57
58
59
60
61
62
63
# OpenKlant ExApp for Nextcloud
# Wraps OpenKlant customer interaction registry with AppAPI integration
#
# OpenKlant is part of the Common Ground ecosystem for Dutch municipalities.
# It requires:
# - PostgreSQL database
# - Redis for caching (optional)
#
# See: https://github.com/maykinmedia/open-klant
# Use upstream OpenKlant image as base (already has Django, uwsgi, etc.)
FROM maykinmedia/open-klant:2.2.0
# Install additional dependencies for ExApp wrapper
USER root
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
tini \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies for ExApp wrapper (FastAPI, uvicorn, httpx)
RUN pip install --no-cache-dir \
"fastapi>=0.109.0" \
"uvicorn>=0.27.0" \
"httpx>=0.26.0"
# Copy ExApp wrapper
COPY ex_app /app/ex_app
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Create directories for media and static files
RUN mkdir -p /app/media /app/static /app/log && \
chown -R nobody:nogroup /app/media /app/static /app/log
WORKDIR /app
# Environment variables (set by AppAPI)
ENV APP_HOST=0.0.0.0
ENV APP_PORT=9000
ENV PYTHONUNBUFFERED=1
# OpenKlant configuration
ENV OPENKLANT_PORT=8000
ENV DJANGO_SETTINGS_MODULE=openklant.conf.docker
# OpenKlant requires these to be set (defaults for development)
ENV DB_HOST=localhost
ENV DB_NAME=openklant
ENV DB_USER=openklant
ENV DB_PASSWORD=openklant
ENV SECRET_KEY=change-me-in-production
ENV ALLOWED_HOSTS=*
# Expose ports: 9000 for AppAPI, 8000 for OpenKlant
EXPOSE 9000 8000
# Health check - just verify the wrapper is responding (any status is ok during init)
HEALTHCHECK --interval=30s --timeout=5s --start-period=90s --retries=3 \
CMD curl -s http://localhost:${APP_PORT:-9000}/heartbeat | grep -q status || exit 1
ENTRYPOINT ["/usr/bin/tini", "--", "/entrypoint.sh"]