diff options
Diffstat (limited to 'support/docker/dev')
-rw-r--r-- | support/docker/dev/Dockerfile | 46 | ||||
-rw-r--r-- | support/docker/dev/setup_postgres.sql | 6 | ||||
-rw-r--r-- | support/docker/dev/usage.md | 20 |
3 files changed, 0 insertions, 72 deletions
diff --git a/support/docker/dev/Dockerfile b/support/docker/dev/Dockerfile deleted file mode 100644 index e41f5e1e2..000000000 --- a/support/docker/dev/Dockerfile +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | FROM ubuntu:bionic | ||
2 | |||
3 | # Avoid tzdata interactive dialog | ||
4 | ENV DEBIAN_FRONTEND=noninteractive | ||
5 | |||
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 \ | ||
9 | curl \ | ||
10 | ffmpeg \ | ||
11 | g++ \ | ||
12 | git \ | ||
13 | gnupg \ | ||
14 | make \ | ||
15 | nano \ | ||
16 | openssl \ | ||
17 | postgresql \ | ||
18 | postgresql-contrib \ | ||
19 | redis-server \ | ||
20 | && curl -sL https://deb.nodesource.com/setup_10.x | bash - \ | ||
21 | && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ | ||
22 | && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ | ||
23 | && apt-get update \ | ||
24 | && apt-get install -qy nodejs yarn \ | ||
25 | && rm -rf /var/lib/apt/lists/* | ||
26 | |||
27 | # Download PeerTube's source code. | ||
28 | RUN git clone -b develop https://github.com/Chocobozzz/PeerTube /home/user/PeerTube | ||
29 | WORKDIR /home/user/PeerTube | ||
30 | |||
31 | # Copy postgresql setup script | ||
32 | COPY setup_postgres.sql /tmp/ | ||
33 | |||
34 | # Install Node.js dependencies and setup PostgreSQL | ||
35 | RUN yarn install --pure-lockfile \ | ||
36 | && service postgresql start \ | ||
37 | && su postgres -c "psql --file=/tmp/setup_postgres.sql" | ||
38 | |||
39 | # Expose PeerTube sources as a volume | ||
40 | VOLUME /home/user/PeerTube | ||
41 | |||
42 | # Expose frontend, API and RTMP | ||
43 | EXPOSE 3000 9000 1935 | ||
44 | |||
45 | # Start PostgreSQL and Redis | ||
46 | CMD ["service postgresql start && redis-server"] | ||
diff --git a/support/docker/dev/setup_postgres.sql b/support/docker/dev/setup_postgres.sql deleted file mode 100644 index 0937f9d19..000000000 --- a/support/docker/dev/setup_postgres.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | create database peertube_dev; | ||
2 | create user peertube password 'peertube'; | ||
3 | grant all privileges on database peertube_dev to peertube; | ||
4 | \c peertube_dev | ||
5 | CREATE EXTENSION pg_trgm; | ||
6 | CREATE EXTENSION unaccent; | ||
diff --git a/support/docker/dev/usage.md b/support/docker/dev/usage.md deleted file mode 100644 index 319d7db30..000000000 --- a/support/docker/dev/usage.md +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | ### Usage | ||
2 | 1. Build the image: | ||
3 | ``` | ||
4 | docker build -t my_peertube_dev . | ||
5 | ``` | ||
6 | 1. Start the container: | ||
7 | ``` | ||
8 | docker run -d -i -p 3000:3000 -p 9000:9000 --name peertube my_peertube_dev | ||
9 | ``` | ||
10 | This will create a new Docker volume containing PeerTube sources. | ||
11 | |||
12 | 1. Start PeerTube inside the container: | ||
13 | ``` | ||
14 | docker exec -it peertube npm run dev | ||
15 | ``` | ||
16 | 1. In another window, find the path to the Docker volume | ||
17 | ``` | ||
18 | docker inspect peertube | less +/Mounts | ||
19 | ``` | ||
20 | You can now make changes to the files. They should be automatically recompiled. | ||