]>
Commit | Line | Data |
---|---|---|
492fd281 JK |
1 | FROM janx/ubuntu-dev |
2 | MAINTAINER Jan Keromnes <janx@linux.com> | |
3 | ||
4 | # Install PeerTube's dependencies. | |
5 | # Packages are from https://github.com/Chocobozzz/PeerTube#dependencies | |
6 | RUN sudo apt-get update -q && sudo apt-get install -qy \ | |
7 | ffmpeg \ | |
8 | postgresql \ | |
9 | openssl | |
10 | ||
11 | # Download PeerTube's source code. | |
12 | RUN git clone -b develop https://github.com/Chocobozzz/PeerTube /home/user/PeerTube | |
13 | WORKDIR /home/user/PeerTube | |
14 | ||
15 | # Configure Cloud9 IDE to use PeerTube's source directory as workspace (-w). | |
16 | RUN sudo sed -i "s/-w \/home\/user/-w \/home\/user\/PeerTube/" /etc/supervisord.conf | |
17 | ||
a585af35 BB |
18 | # Install dependencies. |
19 | RUN yarn install --pure-lockfile | |
20 | ||
b270ad07 JK |
21 | # Configure Janitor for PeerTube. |
22 | ADD janitor.json /home/user/ | |
23 | RUN sudo chown user:user /home/user/janitor.json | |
24 | ||
492fd281 | 25 | # Configure and build PeerTube. |
a585af35 | 26 | ADD create_user.sql /tmp/ |
897cab46 JK |
27 | RUN sudo service postgresql start \ |
28 | && sudo -u postgres psql --file=/tmp/create_user.sql \ | |
29 | && npm run build | |
a585af35 BB |
30 | |
31 | ADD supervisord.conf /tmp/supervisord-extra.conf | |
32 | RUN cat /tmp/supervisord-extra.conf | sudo tee -a /etc/supervisord.conf | |
33 | ||
34 | EXPOSE 3000 9000 |