2017-12-04 10:58:02 +01:00
|
|
|
FROM janx/ubuntu-dev
|
|
|
|
MAINTAINER Jan Keromnes <janx@linux.com>
|
|
|
|
|
|
|
|
# Install PeerTube's dependencies.
|
|
|
|
# Packages are from https://github.com/Chocobozzz/PeerTube#dependencies
|
|
|
|
RUN sudo apt-get update -q && sudo apt-get install -qy \
|
|
|
|
ffmpeg \
|
|
|
|
postgresql \
|
|
|
|
openssl
|
|
|
|
|
|
|
|
# Download PeerTube's source code.
|
|
|
|
RUN git clone -b develop https://github.com/Chocobozzz/PeerTube /home/user/PeerTube
|
|
|
|
WORKDIR /home/user/PeerTube
|
|
|
|
|
|
|
|
# Configure Cloud9 IDE to use PeerTube's source directory as workspace (-w).
|
|
|
|
RUN sudo sed -i "s/-w \/home\/user/-w \/home\/user\/PeerTube/" /etc/supervisord.conf
|
|
|
|
|
2018-01-16 23:37:15 +01:00
|
|
|
# Install dependencies.
|
|
|
|
RUN yarn install --pure-lockfile
|
|
|
|
|
2018-01-16 16:46:04 +01:00
|
|
|
# Configure Janitor for PeerTube.
|
|
|
|
ADD janitor.json /home/user/
|
|
|
|
RUN sudo chown user:user /home/user/janitor.json
|
|
|
|
|
2017-12-04 10:58:02 +01:00
|
|
|
# Configure and build PeerTube.
|
2018-01-16 23:37:15 +01:00
|
|
|
ADD create_user.sql /tmp/
|
2018-01-25 12:35:12 +01:00
|
|
|
RUN sudo service postgresql start \
|
|
|
|
&& sudo -u postgres psql --file=/tmp/create_user.sql \
|
|
|
|
&& npm run build
|
2018-01-16 23:37:15 +01:00
|
|
|
|
|
|
|
ADD supervisord.conf /tmp/supervisord-extra.conf
|
|
|
|
RUN cat /tmp/supervisord-extra.conf | sudo tee -a /etc/supervisord.conf
|
|
|
|
|
|
|
|
EXPOSE 3000 9000
|