-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathsnapcraft.yaml
123 lines (121 loc) · 3.05 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#
# Easiest way to work with this file, from an updated Ubuntu 16.04 LTS image
# 1. create a non-root user with sudo priv and perform following steps as non-root
# 2. `sudo apt-get update`
# 3. `sudo apt-get install snapcraft python build-essential`
# 4. `snapcraft stage`
# 5. `snapcraft snap`
name: workbase-server
version: v0.0.18
summary: WorkBase server
description: Have your own network, built with Meteor.
grade: stable
confinement: strict
assumes: [snapd2.21]
architectures:
- build-on: [armhf]
apps:
workbase-server:
command: startWorkBase
daemon: simple
plugs: [network, network-bind]
workbase-mongo:
command: startmongo
daemon: simple
plugs: [network, network-bind]
workbase-caddy:
command: env LC_ALL=C caddy -conf=$SNAP_DATA/Caddyfile
daemon: simple
plugs: [network, network-bind]
mongo:
command: env LC_ALL=C mongo
plugs: [network]
restoredb:
command: env LC_ALL=C restoredb
plugs: [network]
backupdb:
command: env LC_ALL=C backupdb
plugs: [network]
initcaddy:
command: env LC_ALL=C initcaddy
hooks:
configure:
plugs: [network]
parts:
node:
plugin: dump
source: ./.snapcraft/
override-build: |
./resources/preparenode
snapcraftctl build
build-packages:
# For fibers
- python
- build-essential
- nodejs
workbase-server:
build-packages:
- curl
plugin: dump
override-build: |
./resources/prepareWorkBase
snapcraftctl build
after: [node]
source: ./.snapcraft/
stage-packages:
- graphicsmagick
- execstack
- fontconfig-config
stage:
- programs
- main.js
- .node_version.txt
- etc
- usr
- star.json
mongodb:
build-packages:
- wget
source: ./.snapcraft/
override-build: |
./resources/preparemongo
snapcraftctl build
plugin: dump
stage-packages:
- libssl1.0.0
prime:
- usr
- bin
- lib
scripts:
plugin: dump
source: .snapcraft/resources/
organize:
backupdb: bin/backupdb
restoredb: bin/restoredb
startmongo: bin/startmongo
startWorkBase: bin/startWorkBase
initreplset.js: bin/initreplset.js
Caddyfile: bin/Caddyfile
initcaddy: bin/initcaddy
prime:
- bin
caddy:
override-build: |
./resources/preparecaddy
snapcraftctl build
plugin: dump
source: ./.snapcraft/
prime:
- bin
organize:
caddy: bin/caddy
after: [mongodb]
hooks:
plugin: nil
stage-packages:
- dnsutils
- curl
prime:
- usr
- lib