forked from Staffjoy/v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
55 lines (50 loc) · 1.09 KB
/
BUILD
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
package(default_visibility = ["//visibility:public"])
load("@bazel_tools//tools/build_defs/docker:docker.bzl", "docker_build")
load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar", "pkg_deb")
docker_build(
name = "docker",
base = "//docker:nginx",
debs = [
":app-deb",
],
files = [
":app-tar-src",
],
ports = [
"80",
],
)
pkg_tar(
name = "app-tar-src",
files = glob([
"src/*",
]) + [
"index.template.ejs",
"package.json",
"README.md",
"webpack.config.js",
],
mode = "0440",
)
pkg_tar(
name = "app-tar",
files = glob([
"dist/bundle*.js",
"dist/assets/*",
]) + ["dist/index.html"],
mode = "0644",
package_dir = "/usr/share/nginx/html",
strip_prefix = "/app/dist",
)
pkg_deb(
name = "app-deb",
data = ":app-tar",
depends = [
"nginx",
],
description = "staffjoy app static deb",
homepage = "https://www.staffjoy.com",
maintainer = "Staffjoy <hello@staffjoy.com>",
package = "staffjoyapp",
version = "0.0.1",
)