Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

Commit e15bae9

Browse files
committed
initial commit
0 parents  commit e15bae9

File tree

18 files changed

+245
-0
lines changed

18 files changed

+245
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
src/*
2+
data/mysql/*
3+
data/repo/*

README.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#####################
2+
phabricator on docker
3+
#####################
4+
5+
This is a set of docker_ and docker-compose_ configuration for running phabricator_.
6+
7+
8+
Quick start
9+
===========
10+
11+
::
12+
13+
# clone this repository
14+
git clone https://github.com/philpep/docker-phabricator
15+
cd docker-phabricator
16+
17+
# clone phabricator repositories in ./src
18+
git clone -b stable https://github.com/phacility/phabricator src/phabricator
19+
git clone -b stable https://github.com/phacility/arcanist src/arcanist
20+
git clone -b stable https://github.com/phacility/libphutil src/libphutil
21+
22+
# edit docker-compose.yml and change UID / GID to your own user and group id
23+
# (this is required to have docker processes running with your uid/gid)
24+
edit docker-compose.yaml
25+
26+
# edit etc/local.json and set phabricator.base-uri security.alternate-file-domain as appropriate
27+
edit etc/local.json
28+
29+
# then build docker images
30+
docker-compose build
31+
32+
# then run phabricator
33+
docker-compose up
34+
35+
# then initialize the database
36+
./bin/storage upgrade
37+
38+
# then enjoy your phabricator instance !

bin/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
exec docker-compose exec php /src/phabricator/bin/config $*

bin/storage

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
exec docker-compose exec php /src/phabricator/bin/storage $*

data/mysql/.gitkeep

Whitespace-only changes.

data/repo/.gitkeep

Whitespace-only changes.

docker-compose.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
version: '2'
2+
services:
3+
php:
4+
build:
5+
context: php
6+
args:
7+
UID: 1000
8+
GID: 1000
9+
restart: always
10+
volumes:
11+
- ./src:/src:z
12+
- ./data/repo:/var/repo:z
13+
- ./etc/www.conf:/etc/php7/php-fpm.d/www.conf:z
14+
- ./etc/local.json:/src/phabricator/conf/local/local.json:z
15+
networks:
16+
- phabricator
17+
phd:
18+
build:
19+
context: php
20+
args:
21+
UID: 1000
22+
GID: 1000
23+
restart: always
24+
volumes:
25+
- ./src:/src:z
26+
- ./data/repo:/var/repo:z
27+
- ./etc/www.conf:/etc/php7/php-fpm.d/www.conf:z
28+
- ./etc/local.json:/src/phabricator/conf/local/local.json:z
29+
command: ["/usr/local/bin/phd"]
30+
networks:
31+
- phabricator
32+
mysql:
33+
build:
34+
context: mysql
35+
args:
36+
UID: 1000
37+
GID: 1000
38+
restart: always
39+
volumes:
40+
- ./data/mysql:/var/lib/mysql:z
41+
- ./etc/my.cnf:/etc/mysql/conf.d/my.cnf:z
42+
networks:
43+
- phabricator
44+
nginx:
45+
build: nginx
46+
restart: always
47+
volumes:
48+
- ./etc/nginx.conf:/etc/nginx/conf.d/default.conf:z
49+
- ./src:/src:z
50+
networks:
51+
- phabricator
52+
ports:
53+
- 8080:8080
54+
networks:
55+
phabricator:
56+
external: false

etc/local.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"pygments.enabled": true,
3+
"storage.mysql-engine.max-size": 8388608,
4+
"security.alternate-file-domain": "http://localhost:8080/",
5+
"phabricator.base-uri": "http://localhost:8080/",
6+
"mysql.host": "mysql",
7+
"mysql.user": "root",
8+
"mysql.pass": "notsosecret"
9+
}

etc/my.cnf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[mysqld]
2+
max_allowed_packet=33554432
3+
sql_mode=STRICT_ALL_TABLES
4+
innodb_buffer_pool_size=1600M
5+
skip-name-resolve

etc/nginx.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
server {
2+
listen 8080 default_server;
3+
server_name phab.in.philpep.org phab-cdn.in.philpep.org;
4+
root /src/phabricator/webroot;
5+
location / {
6+
index index.php;
7+
rewrite ^/(.*)$ /index.php?__path__=/$1 last;
8+
}
9+
location /index.php {
10+
fastcgi_pass php:9000;
11+
fastcgi_index index.php;
12+
include fastcgi.conf;
13+
}
14+
}

0 commit comments

Comments
 (0)