Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Coil From Snaps | ||
=============== | ||
|
||
Using | ||
----- | ||
|
||
This is going to change, currently it's a bit more manual than expected. First, installation | ||
and setup:: | ||
|
||
apt-get install redis-server # or equivalent | ||
snap install nikola | ||
snap install coil | ||
snap connect nikola:home core:home | ||
snap connect coil:network core:network | ||
snap connect coil:network-bind core:network-bind | ||
coil write_users | ||
|
||
Then, configure your Nikola site as described in `the Coil docs <https://coil.readthedocs.io/admin/setup/#configuring-full-mode>`__ for "Full Mode". | ||
|
||
Finally: run the different parts:: | ||
|
||
cd /your/nikola/site | ||
# RQ workers | ||
coil.rqworker coil & | ||
|
||
# Gunicorn | ||
coil.gunicorn -b 127.0.0.1:8001 coil.web:app & | ||
|
||
That will make your coil site available in http://127.0.0.1:8001 On first connection you will | ||
change the admin credentials.and then you should proxy that via nginx or something. | ||
|
||
Packaging | ||
--------- | ||
|
||
:: | ||
|
||
sh build.sh | ||
|
||
Hey, it's easy ;-) | ||
|
||
TODO | ||
---- | ||
|
||
* Proper daemonization of coil.rqworker and coil.gunicorn | ||
* Make write_users interactive and give it proper creds from the beginning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
rm -rf parts/ stage/ prime/ | ||
snapcraft pull | ||
# Pillow is not building properly | ||
pip wheel --wheel-dir parts/coil/packages --disable-pip-version-check --no-index --find-links parts/coil/packages pillow | ||
snapcraft prime | ||
# Gunicorn has a silly chown which is blocked by sandboxing | ||
sed -i /chown/d prime/lib/python2.7/site-packages/gunicorn/workers/base.py | ||
snapcraft snap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: coil | ||
version: '1.3.9' | ||
summary: User friendly CMS for Nikola | ||
description: | | ||
Coil provides a web-based interface for the administration of a static | ||
site built using Nikola. | ||
grade: devel # must be 'stable' to release into candidate/stable channels | ||
confinement: strict | ||
|
||
apps: | ||
coil: | ||
command: bin/coil | ||
plugs: [network-bind, network] | ||
rqworker: | ||
command: bin/rqworker | ||
plugs: [network-bind, network] | ||
rqinfo: | ||
command: bin/rqinfo | ||
plugs: [network] | ||
gunicorn: | ||
command: bin/gunicorn | ||
plugs: [network-bind] | ||
|
||
parts: | ||
coil: | ||
# See 'snapcraft plugins' | ||
plugin: python | ||
python-version: python2 | ||
source: git@github.com:getnikola/coil.git | ||
source-tag: v1.3.9 | ||
build-packages: | ||
- python3-dev | ||
python-packages: | ||
- gunicorn | ||
- rq | ||
stage-packages: | ||
- locales | ||
- libc-bin |