Merge be675d631f
into f349a2686c
This commit is contained in:
commit
99ce1c2b9a
5 changed files with 58 additions and 2 deletions
36
Dockerfile
Normal file
36
Dockerfile
Normal file
|
@ -0,0 +1,36 @@
|
|||
FROM alpine:3.15
|
||||
|
||||
ARG DOCKER_USER=dockerapp
|
||||
ARG USER_HOME=/home/$DOCKER_USER
|
||||
ARG DOCKER_GID=5000
|
||||
ARG YCAST_PORT=8010
|
||||
|
||||
EXPOSE $YCAST_PORT
|
||||
|
||||
ENV YCAST_PORT=$YCAST_PORT
|
||||
|
||||
RUN adduser -h $USER_HOME -s /bin/sh -u $DOCKER_GID -D $DOCKER_USER
|
||||
|
||||
RUN apk update \
|
||||
&& apk add python3 py3-setuptools dumb-init \
|
||||
&& apk add --virtual build-tools gcc python3-dev libpq-dev musl-dev \
|
||||
&& apk add jpeg-dev zlib-dev
|
||||
|
||||
ARG SRC_HOME=/usr/local/src
|
||||
ARG YCAST_SRC=$SRC_HOME/ycast
|
||||
RUN mkdir -p $YCAST_SRC
|
||||
|
||||
COPY ycast/* $YCAST_SRC/
|
||||
COPY setup.py README.md $SRC_HOME/
|
||||
COPY examples/stations.yml.example /etc/stations.yml
|
||||
|
||||
RUN cd $SRC_HOME && python3 $SRC_HOME/setup.py build && python3 $SRC_HOME/setup.py install
|
||||
|
||||
RUN apk del build-tools
|
||||
|
||||
COPY docker/entrypoint.sh /usr/local/bin/
|
||||
|
||||
WORKDIR $USER_HOME
|
||||
USER $DOCKER_USER
|
||||
|
||||
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh"]
|
|
@ -31,6 +31,7 @@ Any reported device helps the community to see which AVRs work properly and whic
|
|||
|
||||
* Denon AVR-X_000 series (AVR-X1000, AVR-2000, AVR-X3000, AVR-X4000)
|
||||
* Denon AVR-1912
|
||||
* Denon AVR-3313
|
||||
* Denon AVR-X2200W
|
||||
* Denon CEOL piccolo N5
|
||||
* Denon CEOL N9
|
||||
|
|
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
version: '2.2'
|
||||
services:
|
||||
ycast:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image:
|
||||
af/ycast
|
||||
ports:
|
||||
- "8080:8010"
|
||||
mem_limit: 64M
|
9
docker/entrypoint.sh
Executable file
9
docker/entrypoint.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/dumb-init /bin/sh
|
||||
|
||||
SCRIPT_DIR=$(dirname $(readlink -f $0))
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
CMD="python3 -m ycast -p $YCAST_PORT -c /etc/stations.yml -d"
|
||||
echo $CMD
|
||||
$CMD
|
||||
|
|
@ -121,7 +121,7 @@ def vtuner_redirect(url):
|
|||
@app.route('/setupapp/<path:path>',
|
||||
methods=['GET', 'POST'])
|
||||
def upstream(path):
|
||||
if request.args.get('token') == '0':
|
||||
if request.args.get('token') == '0' or 'SignIn.asp' in path:
|
||||
return vtuner.get_init_token()
|
||||
if request.args.get('search'):
|
||||
return station_search()
|
||||
|
@ -154,7 +154,6 @@ def landing(path=''):
|
|||
page.set_count(1)
|
||||
return page.to_string()
|
||||
|
||||
|
||||
@app.route('/' + PATH_ROOT + '/' + PATH_MY_STATIONS + '/',
|
||||
methods=['GET', 'POST'])
|
||||
def my_stations_landing():
|
||||
|
|
Loading…
Add table
Reference in a new issue