Skip to content
Permalink
Browse files

snapstuff

  • Loading branch information
ralsina committed Oct 21, 2016
1 parent 839993d commit 7209924b1f974f0f34712dd567f20c273f530229
Showing with 93 additions and 0 deletions.
  1. +45 −0 snapcraft/README
  2. +9 −0 snapcraft/build.sh
  3. +39 −0 snapcraft/snapcraft.yaml
@@ -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
@@ -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
@@ -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

0 comments on commit 7209924

Please sign in to comment.
You can’t perform that action at this time.