mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-04-20 04:19:18 +00:00
add parsoid image
This commit is contained in:
parent
2b18c3f9b1
commit
e7c1cd5063
28
parsoid/Dockerfile
Normal file
28
parsoid/Dockerfile
Normal file
@ -0,0 +1,28 @@
|
||||
FROM alpine:3.6
|
||||
|
||||
ENV NODE_ENV=production \
|
||||
GID=991 UID=991 \
|
||||
INTERFACE=0.0.0.0 \
|
||||
PORT=8000 \
|
||||
ADDRESS=http://localhost/w/ \
|
||||
DOMAIN=localhost
|
||||
|
||||
RUN apk -U --no-cache add \
|
||||
ca-certificates \
|
||||
libressl \
|
||||
nodejs-current \
|
||||
nodejs-current-npm \
|
||||
s6 \
|
||||
git \
|
||||
su-exec \
|
||||
&& git clone https://gerrit.wikimedia.org/r/p/mediawiki/services/parsoid --depth=1 \
|
||||
&& cd parsoid && npm install
|
||||
|
||||
COPY rootfs /
|
||||
|
||||
RUN chmod +x /usr/local/bin/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["run.sh"]
|
||||
CMD ["/bin/s6-svscan", "/etc/s6.d"]
|
2
parsoid/rootfs/etc/s6.d/.s6-svscan/finish
Normal file
2
parsoid/rootfs/etc/s6.d/.s6-svscan/finish
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exit 0
|
3
parsoid/rootfs/etc/s6.d/ghost/run
Normal file
3
parsoid/rootfs/etc/s6.d/ghost/run
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /parsoid
|
||||
exec node bin/server.js
|
19
parsoid/rootfs/usr/local/bin/run.sh
Normal file
19
parsoid/rootfs/usr/local/bin/run.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
echo
|
||||
echo ">>> wonderfall/parsoid container <<<"
|
||||
echo
|
||||
|
||||
cd /parsoid
|
||||
cp config.example.yaml config.yaml
|
||||
sed -i "s|http://localhost/w/|$ADDRESS|g" config.yaml
|
||||
sed -i "s|domain: 'localhost'|domain: '$DOMAIN'|g" config.yaml
|
||||
|
||||
echo "> Updating permissions..."
|
||||
chown -R ${UID}:${GID} /parsoid /etc/s6.d
|
||||
|
||||
echo "> Executing process..."
|
||||
if [ '$@' == '' ]; then
|
||||
exec su-exec ${UID}:${GID} /bin/s6-svscan /etc/s6.d
|
||||
else
|
||||
exec su-exec ${UID}:${GID} "$@"
|
||||
fi
|
16
parsoid/rootfs/usr/local/etc/disqus.conf
Normal file
16
parsoid/rootfs/usr/local/etc/disqus.conf
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '<SHORTNAME>';
|
||||
var disqus_identifier = '{{post.id}}';
|
||||
|
||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||
|
21
parsoid/rootfs/usr/local/etc/ghost.example.conf
Normal file
21
parsoid/rootfs/usr/local/etc/ghost.example.conf
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"url": "https://my-ghost-blog.com",
|
||||
|
||||
"server": {
|
||||
"host": "0.0.0.0",
|
||||
"port": "2368"
|
||||
},
|
||||
|
||||
"database": {
|
||||
"client": "sqlite3",
|
||||
"connection": {
|
||||
"filename": "content/data/ghost-dev.db"
|
||||
},
|
||||
"useNullAsDefault": true,
|
||||
"debug": false
|
||||
},
|
||||
|
||||
"mail": {
|
||||
"transport": "Direct"
|
||||
}
|
||||
}
|
7
parsoid/rootfs/usr/local/etc/isso.conf
Normal file
7
parsoid/rootfs/usr/local/etc/isso.conf
Normal file
@ -0,0 +1,7 @@
|
||||
</footer>
|
||||
<script data-isso="//<HOST>/"
|
||||
data-isso-avatar="<AVATAR>"
|
||||
data-isso-vote="<VOTE>"
|
||||
src="//<HOST>/js/embed.min.js"></script>
|
||||
|
||||
<section id="isso-thread"></section>
|
Loading…
x
Reference in New Issue
Block a user