Initial commit for Nextcloud Talk OCI
This commit is contained in:
38
Dockerfile
Normal file
38
Dockerfile
Normal file
@@ -0,0 +1,38 @@
|
||||
FROM ghcr.io/nextcloud-releases/aio-talk:latest
|
||||
|
||||
# --- 1. SWITCH TO ROOT ---
|
||||
USER root
|
||||
|
||||
# 2. Install Network Tools
|
||||
RUN apk update && apk add --no-cache \
|
||||
ifupdown-ng \
|
||||
iproute2 \
|
||||
nano
|
||||
|
||||
# 3. Add Config & Script
|
||||
COPY server.conf /config/server.conf
|
||||
COPY start_network.sh /start_network.sh
|
||||
RUN chmod +x /start_network.sh
|
||||
|
||||
# 4. Set Environment
|
||||
ENV SPREED_CONFIG=/config/server.conf
|
||||
|
||||
ENTRYPOINT ["/start_network.sh"]
|
||||
CMD ["--config", "/config/server.conf"]FROM ghcr.io/nextcloud-releases/aio-talk:latest
|
||||
|
||||
# 1. Install Network Tools
|
||||
RUN apk update && apk add --no-cache \
|
||||
ifupdown-ng \
|
||||
iproute2 \
|
||||
nano
|
||||
|
||||
# 2. Add Config & Script
|
||||
COPY server.conf /config/server.conf
|
||||
COPY start_network.sh /start_network.sh
|
||||
RUN chmod +x /start_network.sh
|
||||
|
||||
# 3. Set Environment
|
||||
ENV SPREED_CONFIG=/config/server.conf
|
||||
|
||||
ENTRYPOINT ["/start_network.sh"]
|
||||
CMD ["--config", "/config/server.conf"]
|
||||
10
server.conf
Normal file
10
server.conf
Normal file
@@ -0,0 +1,10 @@
|
||||
[http]
|
||||
listen = 0.0.0.0:8080
|
||||
|
||||
[nats]
|
||||
url = nats://localhost:4222
|
||||
|
||||
[backend]
|
||||
# Replace this later with your actual Nextcloud URL and Secret
|
||||
allowall = false
|
||||
secret = changing_me_is_mandatory
|
||||
33
start_network.sh
Normal file
33
start_network.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
# --- CONFIGURATION ---
|
||||
IP=${STATIC_IP:-"192.168.0.117/24"}
|
||||
GW=${STATIC_GW:-"192.168.0.1"}
|
||||
DNS=${STATIC_DNS:-"192.168.0.113"}
|
||||
|
||||
echo "--- Nextcloud Talk Network Init ---"
|
||||
echo "Using IP: $IP"
|
||||
|
||||
# 1. Generate Network Config (Alpine Syntax)
|
||||
cat <<EOF > /etc/network/interfaces
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
address $IP
|
||||
gateway $GW
|
||||
EOF
|
||||
|
||||
# 2. Set DNS
|
||||
echo "nameserver $DNS" > /etc/resolv.conf
|
||||
|
||||
# 3. Wait for Hardware & Start Network
|
||||
sleep 5
|
||||
ifup eth0
|
||||
|
||||
# 4. Launch Talk Server
|
||||
echo "--- Starting Spreed Backend ---"
|
||||
# The official entrypoint expects a config file or arguments.
|
||||
# We exec the original command passed to the container.
|
||||
exec /usr/bin/signaling "$@"
|
||||
Reference in New Issue
Block a user