add docker
parent
44158c15a5
commit
743f272072
@ -0,0 +1,11 @@
|
||||
FROM alpine:latest
|
||||
RUN apk update && apk add --no-cache python3 py3-pip
|
||||
RUN mkdir -p /opt/ydl_web_ui
|
||||
ADD requirements.txt web_ui/ /opt/ydl_web_ui
|
||||
WORKDIR /opt/ydl_web_ui
|
||||
RUN pip install --disable-pip-version-check --requirement requirements.txt
|
||||
RUN pip install --disable-pip-version-check gunicorn
|
||||
EXPOSE 3000
|
||||
USER nobody
|
||||
ENV YDL_API_HOST=
|
||||
CMD gunicorn router:app --bind :3000
|
@ -0,0 +1,50 @@
|
||||
version: "3.1"
|
||||
services:
|
||||
web_ui:
|
||||
container_name: ydl_web_ui
|
||||
image: nxhs/ydl-web-ui
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- api
|
||||
ports:
|
||||
- 4011:3000
|
||||
environment:
|
||||
- YDL_API_HOST=http://api:80
|
||||
networks:
|
||||
- ydl_api_ng
|
||||
|
||||
api:
|
||||
container_name: ydl_api_ng
|
||||
image: totonyus/ydl_api_ng
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- redis
|
||||
ports:
|
||||
- 5011:80
|
||||
volumes:
|
||||
- ./params:/app/params
|
||||
- ./logs:/app/logs
|
||||
- ./downloads:/app/downloads
|
||||
- ./data:/app/data
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
- UID=1000
|
||||
- GID=1000
|
||||
- NB_WORKERS=5
|
||||
- LOG_LEVEL=error
|
||||
# Redis will be disable is this value is not false, remember to also change the setting in params.ini file
|
||||
- DISABLE_REDIS=false
|
||||
networks:
|
||||
- ydl_api_ng
|
||||
|
||||
redis:
|
||||
container_name: ydl_api_ng_redis
|
||||
image: redis
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- ydl_api_ng
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
|
||||
networks:
|
||||
ydl_api_ng:
|
Loading…
Reference in New Issue