3 # Avoid tzdata interactive dialog
4 ENV DEBIAN_FRONTEND=noninteractive
6 # Install PeerTube's dependencies.
7 # Packages are from https://github.com/Chocobozzz/PeerTube#dependencies
8 RUN apt-get update -q && apt-get install -qy \
22 RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
23 apt-get install -y nodejs
26 RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
27 echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
28 apt-get update && apt-get install yarn
30 # Download PeerTube's source code.
31 RUN git clone -b develop https://github.com/Chocobozzz/PeerTube /home/user/PeerTube
32 WORKDIR /home/user/PeerTube
34 # Install dependencies.
35 RUN yarn install --pure-lockfile
37 # Configure and run PeerTube.
38 COPY setup_postgres.sql /tmp/
39 RUN service postgresql start \
40 && su postgres -c "psql --file=/tmp/setup_postgres.sql"
42 # Expose PeerTube sources as a volume
43 VOLUME /home/user/PeerTube
47 # Start PostgreSQL and Redis
48 CMD service postgresql start && redis-server