2018-05-16 15:25:56 -05:00
|
|
|
FROM janitortechnology/ubuntu-dev
|
2017-12-04 03:58:02 -06:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2018-05-16 15:25:56 -05:00
|
|
|
# Configure the IDEs to use Janitor's source directory as workspace.
|
|
|
|
ENV WORKSPACE /home/user/PeerTube/
|
2017-12-04 03:58:02 -06:00
|
|
|
|
2018-01-16 16:37:15 -06:00
|
|
|
# Install dependencies.
|
|
|
|
RUN yarn install --pure-lockfile
|
|
|
|
|
2018-01-16 09:46:04 -06:00
|
|
|
# Configure Janitor for PeerTube.
|
2018-05-16 15:25:56 -05:00
|
|
|
COPY --chown=user:user janitor.json /home/user/
|
2018-01-16 09:46:04 -06:00
|
|
|
|
2017-12-04 03:58:02 -06:00
|
|
|
# Configure and build PeerTube.
|
2018-05-16 15:25:56 -05:00
|
|
|
COPY create_user.sql /tmp/
|
2018-01-25 05:35:12 -06:00
|
|
|
RUN sudo service postgresql start \
|
|
|
|
&& sudo -u postgres psql --file=/tmp/create_user.sql \
|
|
|
|
&& npm run build
|
2018-01-16 16:37:15 -06:00
|
|
|
|
2018-05-16 15:25:56 -05:00
|
|
|
COPY --chown=user:user supervisord.conf /tmp/supervisord-extra.conf
|
2018-01-16 16:37:15 -06:00
|
|
|
RUN cat /tmp/supervisord-extra.conf | sudo tee -a /etc/supervisord.conf
|
|
|
|
|
|
|
|
EXPOSE 3000 9000
|