adding icecast
This commit is contained in:
@@ -8,10 +8,7 @@ services:
|
|||||||
context: ./nginx
|
context: ./nginx
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: nginx
|
container_name: nginx
|
||||||
environment:
|
env_file: ./.env
|
||||||
BACKEND_HOST: "${BACKEND_HOST}" # from .env
|
|
||||||
BACKEND_PORT: "${BACKEND_PORT}" # from .env
|
|
||||||
DOMAIN: "${DOMAIN}" # from .env
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
@@ -62,18 +59,16 @@ services:
|
|||||||
image: postgres:16
|
image: postgres:16
|
||||||
container_name: "${POSTGRES_HOST}"
|
container_name: "${POSTGRES_HOST}"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
env_file:
|
||||||
POSTGRES_USER: "${POSTGRES_USER}"
|
- ./.env
|
||||||
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
|
|
||||||
POSTGRES_DB: "${POSTGRES_DB}"
|
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
|
|
||||||
icecast2:
|
icecast2:
|
||||||
image: pltnk/icecast2
|
build:
|
||||||
container_name: icecast2
|
context: ./icecast
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: "${ICECAST_HOST}"
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
|
||||||
- ./icecast/icecast.xml:/etc/icecast2/icecast.xml
|
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
|
|||||||
10
icecast/Dockerfile
Normal file
10
icecast/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FROM pltnk/icecast2
|
||||||
|
|
||||||
|
# Copy template + entrypoint into image
|
||||||
|
COPY icecast.xml.template /etc/icecast2/icecast.xml.template
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
# Ensure script is executable
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT [ "entrypoint.sh" ]
|
||||||
8
icecast/entrypoint.sh
Normal file
8
icecast/entrypoint.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Substitute environment variables into template
|
||||||
|
envsubst < /etc/icecast2/icecast.xml.template > /etc/icecast2/icecast.xml
|
||||||
|
|
||||||
|
# Run icecast with the generated config
|
||||||
|
exec icecast -c /etc/icecast2/icecast.xml
|
||||||
27
icecast/icecast.xml.template
Normal file
27
icecast/icecast.xml.template
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<icecast>
|
||||||
|
<authentication>
|
||||||
|
<source-password>${ICECAST_SOURCE_PASSWORD}</source-password>
|
||||||
|
<relay-password>${ICECAST_RELAY_PASSWORD}</relay-password>
|
||||||
|
<admin-user>${ICECAST_ADMIN_USER}</admin-user>
|
||||||
|
<admin-password>${ICECAST_ADMIN_PASSWORD}</admin-password>
|
||||||
|
</authentication>
|
||||||
|
|
||||||
|
<hostname>${ICECAST_HOST}</hostname>
|
||||||
|
|
||||||
|
<listen-socket>
|
||||||
|
<port>${ICECAST_PORT}</port>
|
||||||
|
</listen-socket>
|
||||||
|
|
||||||
|
<mount>
|
||||||
|
<mount-name>${ICECAST_MOUNT}</mount-name>
|
||||||
|
</mount>
|
||||||
|
|
||||||
|
<limits>
|
||||||
|
<clients>100</clients>
|
||||||
|
<sources>2</sources>
|
||||||
|
</limits>
|
||||||
|
|
||||||
|
<security>
|
||||||
|
<chroot>0</chroot>
|
||||||
|
</security>
|
||||||
|
</icecast>
|
||||||
Reference in New Issue
Block a user