-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
84 lines (65 loc) · 2.51 KB
/
Copy pathDockerfile
File metadata and controls
84 lines (65 loc) · 2.51 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# OpenTalk ExApp for Nextcloud
# Wraps OpenTalk video conferencing with AppAPI integration
#
# OpenTalk is a secure video conferencing solution that requires:
# - PostgreSQL database
# - Redis cache
# - Keycloak for authentication
# - LiveKit for WebRTC media
#
# See: https://docs.opentalk.eu/
FROM python:3.11-slim AS builder
# Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies for ExApp wrapper
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --target=/app/deps -r requirements.txt
# Get OpenTalk controller from upstream image
FROM registry.opencode.de/opentalk/controller:v0.31.0-3 AS opentalk-base
# Production image
FROM python:3.11-slim
# Install runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
tini \
libpq5 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy OpenTalk controller binary from upstream
COPY --from=opentalk-base /controller/opentalk-controller /usr/local/bin/opentalk-controller
# Copy Python dependencies
COPY --from=builder /app/deps /usr/local/lib/python3.11/site-packages
# Set up ExApp wrapper
WORKDIR /app
COPY ex_app /app/ex_app
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Create config and data directories
RUN mkdir -p /etc/opentalk /var/lib/opentalk
COPY controller.toml /etc/opentalk/controller.toml
# Environment variables (set by AppAPI)
ENV APP_HOST=0.0.0.0
ENV APP_PORT=23000
ENV PYTHONUNBUFFERED=1
# OpenTalk configuration
ENV OPENTALK_PORT=11311
ENV OPENTALK_CTRL_HTTP__PORT=11311
# Database configuration (required)
ENV OPENTALK_CTRL_DATABASE__URL=postgres://opentalk:opentalk@localhost:5432/opentalk
# Redis configuration (required)
ENV OPENTALK_CTRL_REDIS__URL=redis://localhost:6379/
# Keycloak/OIDC configuration (required)
ENV OPENTALK_CTRL_OIDC__AUTHORITY=http://localhost:8081/realms/opentalk
# LiveKit configuration (required for video)
ENV OPENTALK_CTRL_LIVEKIT__SERVICE_URL=http://localhost:7880
ENV OPENTALK_CTRL_LIVEKIT__API_KEY=devkey
ENV OPENTALK_CTRL_LIVEKIT__API_SECRET=secret
# Expose ports: 9000 for AppAPI, 11311 for OpenTalk controller
EXPOSE 9000 11311
# Health check - just verify the wrapper is responding (any status is ok during init)
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
CMD curl -s http://localhost:${APP_PORT:-9000}/heartbeat | grep -q status || exit 1
ENTRYPOINT ["/usr/bin/tini", "--", "/entrypoint.sh"]