-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlain.yaml
50 lines (45 loc) · 1.5 KB
/
lain.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
appname: todomvc
build:
base: laincloud/golang-node:1.9.0-8.4.0
prepare:
version: 20170904
script:
- go get -u github.com/golang/dep/cmd/dep
- go get -u github.com/go-swagger/go-swagger/cmd/swagger
- mkdir -p $GOPATH/src/github.com/laincloud/todomvc
- cp -rf . $GOPATH/src/github.com/laincloud/todomvc
- cd $GOPATH/src/github.com/laincloud/todomvc && dep ensure
- cd $GOPATH/src/github.com/laincloud/todomvc/frontend && yarn install
script:
- cp -rf . $GOPATH/src/github.com/laincloud/todomvc
- cd $GOPATH/src/github.com/laincloud/todomvc/ && swagger generate server -A todomvc -f ./swagger.yml -T go-swagger-gen-templates/ -t gen
- go install github.com/laincloud/todomvc/gen/cmd/todomvc-server
- cd $GOPATH/src/github.com/laincloud/todomvc/frontend && yarn install && yarn run build
release:
dest_base: laincloud/nginx:1.13.5
copy:
- src: $GOPATH/bin/todomvc-server
dest: /lain/app/todomvc-server
- src: $GOPATH/src/github.com/laincloud/todomvc/nginx.conf
dest: /etc/nginx/nginx.conf
- src: $GOPATH/src/github.com/laincloud/todomvc/frontend/dist
dest: /usr/share/nginx/html
web.web:
cmd: nginx
port: 80
memory: 32M
healthcheck: "/ping"
mountpoint:
- /
web.api:
cmd: /lain/app/todomvc-server --host=0.0.0.0 --port=8080 --config=/lain/app/prod.json
port: 8080
memory: 32M
healthcheck: "/ping"
secret_files:
- /lain/app/prod.json
mountpoint:
- /api
use_services:
mysql-service:
- mysql-master