forked from browserify/wzrd.in
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.koding.yml
64 lines (51 loc) · 1.55 KB
/
.koding.yml
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
provider:
aws:
access_key: '${var.aws_access_key}'
secret_key: '${var.aws_secret_key}'
cloudflare:
email: '${var.custom_cfemail}'
token: '${var.custom_cftoken}'
resource:
aws_instance:
wzrd-in:
koding_always_on: true
instance_type: 't2.medium'
ami: ''
tags:
Name: '${var.koding_user_username}-${var.koding_group_slug}'
user_data: |-
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get -y -qq install python-pip build-essential git
curl --silent --location https://get.docker.com/ | sh
cd /
git clone https://github.com/creationix/nvm.git nvm
. ./nvm/nvm.sh
nvm install 6
git clone https://github.com/ropelive/wzrd.in.git
cd wzrd.in
cat >start.sh <<EOF
export WZRDIN_DOCKER_TAG=browserify-builder
export WZRDIN_CORS_ORIGIN=https://rope.live
export WZRDIN_CORS_METHODS=GET,POST
export WZRDIN_LEVEL_DB=/cdn.db
export WZRDIN_NPM_REGISTRY=https://registry.npmjs.com
export WZRDIN_NPM_SKIMDB=https://skimdb.npmjs.com:443
export WZRDIN_NPM_FOLLOWER_REFRESHRATE=120000
export PORT=80
npm start
EOF
chmod +x start.sh
npm install
npm run bootstrap
echo 'WZRD.in installed!'
aws_eip:
wzrd-in:
instance: "${aws_instance.wzrd-in.id}"
cloudflare_record:
wzrdin:
domain: "${var.custom_cfdomain}"
name: "npm"
value: "${aws_eip.wzrd-in.public_ip}"
type: "A"
ttl: 3600