2018-10-09 17:35:02 +02:00
|
|
|
FROM ubuntu:bionic
|
|
|
|
|
|
|
|
# Avoid tzdata interactive dialog
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2017-12-04 10:58:02 +01:00
|
|
|
|
|
|
|
# Install PeerTube's dependencies.
|
|
|
|
# Packages are from https://github.com/Chocobozzz/PeerTube#dependencies
|
2018-10-09 17:35:02 +02:00
|
|
|
RUN apt-get update -q && apt-get install -qy \
|
|
|
|
curl \
|
|
|
|
nano \
|
2017-12-04 10:58:02 +01:00
|
|
|
ffmpeg \
|
|
|
|
postgresql \
|
2018-10-09 17:35:02 +02:00
|
|
|
postgresql-contrib \
|
|
|
|
openssl \
|
|
|
|
g++ \
|
|
|
|
make \
|
|
|
|
redis-server \
|
|
|
|
git \
|
|
|
|
gnupg
|
|
|
|
|
|
|
|
# Install NodeJS 8.x
|
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
|
|
|
|
apt-get install -y nodejs
|
|
|
|
|
|
|
|
# Install Yarn
|
|
|
|
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
|
|
|
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
|
|
|
|
apt-get update && apt-get install yarn
|
2017-12-04 10:58:02 +01:00
|
|
|
|
|
|
|
# Download PeerTube's source code.
|
|
|
|
RUN git clone -b develop https://github.com/Chocobozzz/PeerTube /home/user/PeerTube
|
|
|
|
WORKDIR /home/user/PeerTube
|
|
|
|
|
2018-01-16 23:37:15 +01:00
|
|
|
# Install dependencies.
|
|
|
|
RUN yarn install --pure-lockfile
|
|
|
|
|
2018-10-09 17:35:02 +02:00
|
|
|
# Configure and run PeerTube.
|
|
|
|
COPY setup_postgres.sql /tmp/
|
|
|
|
RUN service postgresql start \
|
|
|
|
&& su postgres -c "psql --file=/tmp/setup_postgres.sql"
|
2018-01-16 16:46:04 +01:00
|
|
|
|
2018-10-09 17:35:02 +02:00
|
|
|
# Expose PeerTube sources as a volume
|
|
|
|
VOLUME /home/user/PeerTube
|
2018-01-16 23:37:15 +01:00
|
|
|
|
|
|
|
EXPOSE 3000 9000
|
2018-10-09 17:35:02 +02:00
|
|
|
|
|
|
|
# Start PostgreSQL and Redis
|
|
|
|
CMD service postgresql start && redis-server
|