-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
123 lines (108 loc) · 3.79 KB
/
docker-compose.yml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
version: '3.7'
services:
rtl_tcp:
# https://github.com/Cossey/docker/tree/master/rtl-tcp
image: docker.io/kosdk/rtl-tcp
container_name: rtl_tcp
# Set privileged to true if device passthrough does not work
privileged: false
devices:
# the path to the USB rtl device, use command 'lsusb' to get [BUS]/[DEVICE] identifiers
#- "/dev/bus/usb/[BUS]/[DEVICE]"
# Example (replace with your own)
- ${USB_DEVICE:-/dev/bus/usb/}
environment:
# If the container fails with an error about usb handling
# and the output lists multiple devices try 1,2,etc... device
- DEVICE=${RTL_DEVICE:-0}
# make other containers wait at least 5 seconds so rtl_tcp has time to start up
healthcheck:
test: ["CMD", "echo", "0"]
interval: 5s
start_period: 5s
timeout: 2s
retries: 3
icecast:
image: docker.io/riftbit/icecast
container_name: icecast
# expose port if you want icecast to be accessible on your host network
ports:
# ICECAST_PORT is the host port
- "${ICECAST_PORT:-8000}:8000"
environment:
# internally used for container connections, do not edit
ICE_RADIO_LISTEN_PORT: 8000
ICE_RADIO_SOURCE_PASSWORD: ${ICECAST_PWD:-hackme}
ICE_RADIO_ADMIN_PASSWORD: ${ICECAST_ADMIN_PW:-hackme}
ICE_RADIO_ADMIN_USERNAME: ${ICECAST_ADMIN_USER:-admin}
# If you do not need ytdl to save from icecast remove
# --profile ytdl and 'ytdl' from COMPOSE_PROFILES
# in the below example commands for nrsc5/shinysdr
icecast_ytdl:
image: docker.io/foxxmd/ytdl-cron
depends_on:
- icecast
profiles:
- ytdl
container_name: icecast_ytdl
environment:
# https://docs.linuxserver.io/general/understanding-puid-and-pgid/
- PUID=${PUID}
- PGID=${PGID}
# replace with TZ identifier for your timezone so cron schedule is in local time
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
- TZ=${TZ}
volumes:
- "${YTDL_DIR:-./config/ytdl}:/config"
#
# Can use EITHER nrsc5 (hd) OR shinysdr (fm) -- cannot use both at the same time
#
# docker compose --profile hd --profile ytdl up
# or in .env COMPOSE_PROFILES=hd,ytdl
#####################
nrsc5:
image: ghcr.io/foxxmd/nrsc5-rtlsdr-icecast:test
container_name: nrsc5_icecast
profiles:
- hd
depends_on:
rtl_tcp:
condition: service_healthy
#condition: service_started
icecast:
condition: service_started
environment:
- ICECAST_URL=icecast:8000/${ICECAST_STATION_NAME:-myradio}
- ICECAST_PWD=${ICECAST_PWD:-hackme}
# FM radio station
- RADIO_STATION=${RADIO_STATION:?error}
# if your station has multiple HD channels set it here, otherwise Channel 1 is default
- CHANNEL=${HD_CHANNEL:-1}
# Audio output format to stream to Icecast -- Valid formats: MP3, WAV, OGG
- AUDIO_FORMAT=${AUDIO_FORMAT:-MP3}
- RTL_TCP=rtl_tcp:1234
# keeps ffmpeg output quiet. # of seconds between ffmpeg progress output
- STATS_INTERVAL=${STATS_INTERVAL:-0}
#####################
# docker compose --profile fm --profile ytdl up
# or in .env COMPOSE_PROFILES=fm,ytdl
#####################
shinysdr:
image: docker.io/jeffersonjhunt/shinysdr
profiles:
- fm
depends_on:
- rtl_tcp
- icecast
container_name: shinysdr
volumes:
- './config/shinysdr:/config'
shiny_ffmpeg:
image: linuxserver/ffmpeg
depends_on:
- shinysdr
profiles:
- fm
container_name: shiny_ffmpeg
command: -nostats -i http://shinysdr:8100/public/audio-stream?rate=48000 -vn -codec:a libmp3lame -b:a 192k -f mp3 -content_type audio/mpeg icecast://source:${ICECAST_PWD:-hackme}@icecast:8000/${ICECAST_STATION_NAME:-myradio}
#####################