Skip to content

Commit 5c35c22

Browse files
authored
Merge pull request #186 from danwdart/dockerise
Dockerise steps
2 parents b66c9da + eeed618 commit 5c35c22

File tree

295 files changed

+16436
-3906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

295 files changed

+16436
-3906
lines changed

.babelrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
db
2+
info
3+
scripts
4+
servers/docker
5+
src/js/node_modules
6+
src/php/vendor

.env.docker

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
APPLICATION_ENV=development
2+
NODE_ENV=development
3+
4+
EMAILS_PATH=/var/www/mustache/en_GB/mail
5+
UPLOADS_PATH=/var/www/public/uploads
6+
7+
SQL_ADAPTER=pdo_mysql
8+
9+
SQL_PASSWORD=testtest123
10+
SQL_USER=chaplin
11+
SQL_DATABASE=chaplin
12+
SQL_HOST=mysql
13+
SQL_PORT=3306
14+
15+
AMQP_HOST=rabbitmq
16+
AMQP_PORT=5672
17+
AMQP_USER=root
18+
AMQP_PASSWORD=root
19+
AMQP_VHOST=/
20+
21+
SMTP_HOST=smtp.gmail.com
22+
SMTP_USE_TLS=true
23+
SMTP_PORT=587
24+
SMTP_USER=
25+
SMTP_PASSWORD=
26+
27+
# https://developer.vimeo.com/apps
28+
VIMEO_CLIENT_SECRET=
29+
VIMEO_CLIENT_ID=
30+
VIMEO_ACCESS_TOKEN=
31+
32+
# https://console.developers.google.com/apis/credentials
33+
YOUTUBE_API_TOKEN=
34+
35+
GOOGLE_CLIENT_ID=
36+
GOOGLE_CLIENT_SECRET=
37+
38+
FACEBOOK_CLIENT_ID=
39+
FACEBOOK_CLIENT_SECRET=
40+
41+
TWITTER_CONSUMER_KEY=
42+
TWITTER_CONSUMER_SECRET=
43+
44+
SCHEME=http
45+
VHOST=dev.projectchaplin.com
46+
VHOST_PORT=80
47+
VHOST_SHORT=pc
48+
VHOST_NODE=node.projectchaplin.com
49+
VHOST_NODE_PORT=80
50+
51+
VHOST_GUI=dev.projectchaplin.com
52+
53+
API_HOST=api
54+
API_PORT=9000
55+
56+
NODE_HOST=node
57+
NODE_PORT=3000

.env.example

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
APPLICATION_ENV=development
2+
NODE_ENV=development
3+
4+
EMAILS_PATH=/var/www/mustache/en_GB/mail
5+
UPLOADS_PATH=/var/www/public/uploads
6+
7+
SQL_ADAPTER=pdo_mysql
8+
9+
MYSQL_ROOT_PASSWORD=testtest123
10+
MYSQL_DATABASE=chaplin
11+
MYSQL_USER=chaplin
12+
MYSQL_PASSWORD=chaplin
13+
14+
SQL_PASSWORD=${MYSQL_PASSWORD}
15+
SQL_USER=${MYSQL_USER}
16+
SQL_DATABASE=${MYSQL_DATABASE}
17+
SQL_HOST=mysql
18+
SQL_PORT=3306
19+
20+
AMQP_HOST=rabbitmq
21+
AMQP_PORT=5672
22+
AMQP_USER=root
23+
AMQP_PASSWORD=root
24+
AMQP_VHOST=/
25+
26+
SMTP_HOST=smtp.gmail.com
27+
SMTP_USE_TLS=true
28+
SMTP_PORT=587
29+
SMTP_USER=
30+
SMTP_PASSWORD=
31+
32+
# https://developer.vimeo.com/apps
33+
VIMEO_CLIENT_SECRET=
34+
VIMEO_CLIENT_ID=
35+
VIMEO_ACCESS_TOKEN=
36+
37+
# https://console.developers.google.com/apis/credentials
38+
YOUTUBE_API_TOKEN=
39+
40+
GOOGLE_CLIENT_ID=
41+
GOOGLE_CLIENT_SECRET=
42+
43+
FACEBOOK_CLIENT_ID=
44+
FACEBOOK_CLIENT_SECRET=
45+
46+
TWITTER_CONSUMER_KEY=
47+
TWITTER_CONSUMER_SECRET=
48+
49+
SCHEME=http
50+
VHOST=dev.projectchaplin.com
51+
VHOST_PORT=80
52+
VHOST_SHORT=pc
53+
VHOST_NODE=node.projectchaplin.com
54+
VHOST_NODE_PORT=80
55+
56+
VHOST_GUI=dev.projectchaplin.com
57+
58+
API_HOST=api
59+
API_PORT=9000
60+
61+
NODE_HOST=node
62+
NODE_PORT=3000

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ npm-debug.log
88
/public/js/*.woff*
99
/public/js/*.eot
1010
/public/js/*.ttf
11+
.env

Dockerfile

Lines changed: 0 additions & 13 deletions
This file was deleted.

README.md

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
# Project Chaplin
2-
an open source, self-hosted video sharing service
2+
3+
An open source, self-hosted video sharing service
34

45
## Current features
56
* AGPLv3 License
67
* No intrusive adverts
78
* No restrictions on content by country, IP or government
89
* Video downloading as standard
910
* HTML5 WebM as standard
10-
* Live streaming (pluginless)
1111
* Brightness/Contrast controls
1212
* Easter eggs?
13+
* [12-Factor App](https://www.12factor.net/)
14+
* Fully Docker service compatible
1315

1416
## Future features
17+
* Live streaming (pluginless) - to be re-implemented
1518
* No staff blocking, auto-blocking only on public demand
1619
* REST APIs
1720
* Public tagging
@@ -21,20 +24,38 @@ an open source, self-hosted video sharing service
2124
* Download audio
2225
* Scrape from other public APIs
2326

24-
## Recommended way to install
25-
Try using Docker for a fast install:
27+
## Recommended way to install and run
28+
29+
1. Copy over the special `/.env.docker` to `/.env` and edit environment variables as appropriate
30+
2. Use [Docker Compose](https://docs.docker.com/compose/) to install:
31+
32+
`docker-compose -p chaplin -f servers/docker/docker-compose.yml up -d`
33+
34+
3. Visit the site (http://localhost or add the vhost - by default http://dev.projectchaplin.com - to /etc/hosts).
2635

27-
`docker run --link mysql:mysql --link redis:redis --link rabbitmq:rabbitmq -p 80:80 -p 1337:1337 -d --rm -v $PWD:/var/www kathiedart/projectchaplin`
36+
## Development on Docker
2837

29-
This will install the dependencies and let you use your local pull as a volume. To upgrade at any time just git pull.
38+
Edits on the source repository will be propagated to the docker environment with this command instead of the above:
39+
40+
`docker-compose -p chaplin -f servers/docker/docker-compose.dev.yml up -d`
41+
42+
## Manual install
43+
44+
- Copy over `/.env.example` to `/.env` and edit environment variables as appropriate
45+
- Check the Dockerfiles in `servers/docker` for installation instructions for each component.
46+
- Compile the client-side JS in `src/php` by using `npm install` and `npm run build`.
47+
- Ensure PHP has the bcmath, pdo and pdo_mysql (or whichever DB you use) extension.
48+
- Install the PHP in `src/php` by using `composer install`.
49+
- Install Nginx to serve PHP in `src/php/public`.
50+
- Run listeners in `src/php/cli/cli.php` like: `php cli.php cli youtube`, `php cli.php cli convert` and `php cli.php cli vimeo`.
51+
- Nginx configs are in `servers/nginx` and copy `servers/php-fpm/uploads.ini` to php-fpm's `conf.d`.
52+
- SQL schema is in `db/`.
53+
- Add appropriate hosts to `/etc/hosts` or use DNS.
3054

3155
## Join us!
3256
We are currently looking for developers and designers to help this open source project.
33-
If you're interested please contact me at chaplin@kathiedart.co.uk.
57+
If you're interested please contact me at chaplin@jolharg.com.
3458

3559
## Issues
3660
For help, you can create an issue on the Github project:
37-
https://github.com/kathiedart/projectchaplin/issues
38-
39-
### Remember
40-
Have fun!
61+
https://github.com/danwdart/projectchaplin/issues

apache/projectchaplin.conf

Lines changed: 0 additions & 12 deletions
This file was deleted.

application/config/oauth.php

Lines changed: 0 additions & 60 deletions
This file was deleted.

application/modules/admin/Bootstrap.php

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)