Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12239399
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/Dockerfile b/Dockerfile
index f88103b..516e290 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,32 +1,33 @@
#
# Nasqueron - Phabricator image
#
FROM nasqueron/nginx-php-fpm
MAINTAINER Sébastien Santoro aka Dereckson <dereckson+nasqueron-docker@espace-win.org>
#
# Prepare the container
#
RUN apt-get update && apt-get install -y \
- git mercurial subversion python-pygments openssh-client mysql-client \
- --no-install-recommends && rm -r /var/lib/apt/lists/*
-
+ git mercurial subversion python-pygments openssh-client \
+ mysql-client \
+ --no-install-recommends && rm -r /var/lib/apt/lists/* && \
+ pear config-set preferred_state beta && \
+ pecl install APCu
+
RUN cd /opt && \
git clone https://github.com/phacility/libphutil.git && \
git clone https://github.com/phacility/arcanist.git && \
git clone https://github.com/phacility/phabricator.git && \
- rm /etc/nginx/sites-enabled/default
-
-RUN pear config-set preferred_state beta && pecl install APCu
+ rm /etc/nginx/sites-enabled/default && \
+ mkdir -p /var/tmp/phd && \
+ chown app:app /var/tmp/phd
COPY files /
#
# Docker properties
#
VOLUME ["/opt/phabricator/conf/local", "/var/repo"]
-
-#INIT
diff --git a/files/etc/service/phd/run b/files/etc/service/phd/run
new file mode 100755
index 0000000..5811027
--- /dev/null
+++ b/files/etc/service/phd/run
@@ -0,0 +1,4 @@
+#!/bin/bash
+exec 2>&1
+exec chpst -u app:app /usr/local/bin/phd-wrapper
+
diff --git a/files/usr/local/bin/phd-wrapper b/files/usr/local/bin/phd-wrapper
new file mode 100755
index 0000000..e679365
--- /dev/null
+++ b/files/usr/local/bin/phd-wrapper
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+PHD=/opt/phabricator/bin/phd
+
+#
+# Signals handling
+#
+
+on_stop()
+{
+ $PHD stop
+ exit 1
+}
+
+trap on_stop INT
+trap on_stop TERM
+
+#
+# Starts Phabricator daemon, then waits for signals.
+#
+
+$PHD start
+
+while :
+do
+ sleep 0.2
+done
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Oct 11, 21:27 (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3064101
Default Alt Text
(1 KB)
Attached To
Mode
rDPHAB Docker image for Phabricator
Attached
Detach File
Event Timeline
Log In to Comment