-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnapcraft.yaml
35 lines (32 loc) · 1.14 KB
/
snapcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: pelican-blog-server # You'll need to change this
version: '1.0' # just for humans.
summary: Your pelican blog shipped as a snap, with a caddy server
description: |
This is your Pelican blog shipped in a snap, so that it auto-deploys when you
push a new version to the store. It is served by Caddy and runs in a
contained environment.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # this enforces "plugs" for security.
apps:
blog-server:
command: "bin/caddy -conf $SNAP/Caddyfile"
daemon: simple
plugs: [network-bind] # Only allowed to bind network, nothing else.
parts:
caddy:
plugin: nil
install: |
wget --compression=none "https://caddyserver.com/download/linux/amd64?plugins=http.expires&license=" -O caddy.tar.gz
tar xzf caddy.tar.gz
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
cp caddy $SNAPCRAFT_PART_INSTALL/bin
caddyfile:
plugin: nil
install: |
cp Caddyfile $SNAPCRAFT_PART_INSTALL/Caddyfile
blog-generation:
build-packages: [pelican]
plugin: make
build: |
make publish
cp -r output $SNAPCRAFT_PART_INSTALL/payload