You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 

63 lines
2.0 KiB

FROM alpine:3.7
ARG PEERTUBE_VER=develop
ENV UID=991 GID=991 \
HTTPS=false \
HOSTNAME=peertube.localhost \
PORT=80 \
DATABASE_HOST=localhost \
DATABASE_PORT=5432 \
DATABASE_USERNAME=peertube \
DATABASE_PASSWORD=peertube \
ADMIN_EMAIL=admin@domain.local \
SIGNUP_ENABLE=false \
TRANSCODING_ENABLE=false \
TRANSCODING_THREADS=2 \
BODY_SIZE=100M \
CACHE_SIZE=100 \
SIGNUP_LIMIT=10 \
VIDEO_QUOTA=-1 \
RESOLUTION_280=true \
RESOLUTION_360=true \
RESOLUTION_480=true \
RESOLUTION_720=true \
RESOLUTION_1080=true \
DEBIAN_FRONTEND=noninteractiv
RUN addgroup -g 991 peertube && adduser -u 991 -G peertube -s /bin/sh -D -h /home/peertube peertube \
&& apk -U upgrade \
&& apk add -t build-dependencies \
git \
build-base \
g++ \
python-dev \
make \
&& apk add vips-dev fftw-dev vips fftw --update-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing/ \
&& apk -U add yarn ffmpeg libressl su-exec curl nodejs shadow python py-jinja2 bash nginx \
&& git clone --branch ${PEERTUBE_VER} https://github.com/Chocobozzz/PeerTube /PeerTube \
&& echo "****** chown ******" \
&& chown -R peertube:peertube PeerTube \
&& cd /PeerTube \
&& echo "****** run npm install as user ******" \
&& su-exec peertube:peertube npm install \
&& echo "****** run yarn install as user ******" \
&& bash -c "su-exec peertube:peertube yarn install" \
&& echo "****** run npm run build as user ******" \
&& bash -c "su-exec peertube:peertube npm run build" \
&& apk del build-dependencies \
&& rm -rf /tmp/* /PeerTube.git /var/cache/apk/* /var/cache/apk/*
EXPOSE 8080
COPY rootfs /
RUN chmod +x /usr/local/bin/startup-alpine
WORKDIR /PeerTube/
VOLUME ["/PeerTube/certs", "/PeerTube/videos", "/PeerTube/logs", "/PeerTube/previews", "/PeerTube/thumbnails", "/PeerTube/torrents"]
ENTRYPOINT ["/usr/local/bin/startup-alpine"]