Include building ui into dockerfile (#62)

* Include building ui into docker file

* Specify docker.io for image

* removing old dist files

* update gitignore to skip dist folders

* adding build to arguments as the files are no longer in repo

* remove bindfs to figure out the problem later

* running all instead of just specified

* removed bindfs action

* disabling error check for now until we move building ui assets to action

* added npm install & run to pull_request yaml

* build ui folder

* --prefix on install deps

* --prefix on install deps

* re-added not checking generated files

Co-authored-by: Fredrik Grönqvist <fredrik.gronqvist@embark-studios.com>
This commit is contained in:
Markus Viitamäki
2020-04-20 03:51:29 +02:00
committed by GitHub
parent 758100558a
commit 9d93f4092c
13 changed files with 18 additions and 15039 deletions
+9 -1
View File
@@ -11,6 +11,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: npm install dependencies
run: npm install --prefix ui
- name: npm run build
run: npm run --prefix ui build
- name: bindfs
uses: "cedrickring/golang-action@1.4.1"
with:
@@ -18,7 +26,7 @@ jobs:
- name: Check styling error
uses: "cedrickring/golang-action@1.4.1"
with:
args: go get -u golang.org/x/lint/golint; golint -set_exit_status main.go server.go config.go # ./... update to use package when https://github.com/go-bindata/go-bindata/pull/37 is merged
args: go get -u golang.org/x/lint/golint; golint -set_exit_status main.go server.go config.go
- name: Check missing error check
uses: "cedrickring/golang-action@1.4.1"
with:
+1
View File
@@ -4,3 +4,4 @@
ui/public/bundle.*
node_modules
.idea
dist
+8 -1
View File
@@ -1,3 +1,10 @@
FROM docker.io/node:12-alpine AS ui
WORKDIR /ui
COPY ui/package.json ui/package-lock.json /ui/
RUN npm install
COPY ui .
RUN npm run build
FROM docker.io/golang:1.13 AS build
WORKDIR /wg
RUN go get github.com/go-bindata/go-bindata/... &&\
@@ -6,7 +13,7 @@ COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
COPY /ui/dist ui/dist
COPY --from=ui /ui/dist ui/dist
RUN go-bindata-assetfs -prefix ui/dist ui/dist &&\
go install .
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

-15
View File
@@ -1,15 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>wireguard-ui</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono">
<link rel="shortcut icon" href="/favicon.png"><link href="/vendors~main.css?cea63361befb692ab573" rel="stylesheet"><link href="/main.css?cea63361befb692ab573" rel="stylesheet"></head>
<body>
<script type="text/javascript" src="/vendors~main.1.js?cea63361befb692ab573"></script><script type="text/javascript" src="/main.js?cea63361befb692ab573"></script></body>
</html>
-236
View File
@@ -1,236 +0,0 @@
.mdc-typography {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
.mdc-typography--headline1 {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 6rem;
line-height: 6rem;
font-weight: 300;
letter-spacing: -0.01562em;
text-decoration: inherit;
text-transform: inherit;
}
.mdc-typography--headline2 {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 3.75rem;
line-height: 3.75rem;
font-weight: 300;
letter-spacing: -0.00833em;
text-decoration: inherit;
text-transform: inherit;
}
.mdc-typography--headline3 {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 3rem;
line-height: 3.125rem;
font-weight: 400;
letter-spacing: normal;
text-decoration: inherit;
text-transform: inherit;
}
.mdc-typography--headline4 {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 2.125rem;
line-height: 2.5rem;
font-weight: 400;
letter-spacing: 0.00735em;
text-decoration: inherit;
text-transform: inherit;
}
.mdc-typography--headline5 {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 1.5rem;
line-height: 2rem;
font-weight: 400;
letter-spacing: normal;
text-decoration: inherit;
text-transform: inherit;
}
.mdc-typography--headline6 {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 1.25rem;
line-height: 2rem;
font-weight: 500;
letter-spacing: 0.0125em;
text-decoration: inherit;
text-transform: inherit;
}
.mdc-typography--subtitle1 {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 1rem;
line-height: 1.75rem;
font-weight: 400;
letter-spacing: 0.00937em;
text-decoration: inherit;
text-transform: inherit;
}
.mdc-typography--subtitle2 {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 0.875rem;
line-height: 1.375rem;
font-weight: 500;
letter-spacing: 0.00714em;
text-decoration: inherit;
text-transform: inherit;
}
.mdc-typography--body1 {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 1rem;
line-height: 1.5rem;
font-weight: 400;
letter-spacing: 0.03125em;
text-decoration: inherit;
text-transform: inherit;
}
.mdc-typography--body2 {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 0.875rem;
line-height: 1.25rem;
font-weight: 400;
letter-spacing: 0.01786em;
text-decoration: inherit;
text-transform: inherit;
}
.mdc-typography--caption {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 0.75rem;
line-height: 1.25rem;
font-weight: 400;
letter-spacing: 0.03333em;
text-decoration: inherit;
text-transform: inherit;
}
.mdc-typography--button {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 0.875rem;
line-height: 2.25rem;
font-weight: 500;
letter-spacing: 0.08929em;
text-decoration: none;
text-transform: uppercase;
}
.mdc-typography--overline {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 0.75rem;
line-height: 2rem;
font-weight: 500;
letter-spacing: 0.16667em;
text-decoration: none;
text-transform: uppercase;
}
.container {
padding: 30px;
}
body {
margin: 0;
padding: 0;
}
.float-right {
float: right;
}
dl {
display: flex;
flex-flow: row wrap;
}
dt {
flex-basis: 20%;
font-weight: bold;
text-align: right;
}
dd {
flex-basis: 70%;
flex-grow: 1;
margin-left: 0.5em;
overflow: hidden;
}
@media screen and (max-width: 800px) {
img.svelte-9q81nd {
display: none;
}
}
img.svelte-9q81nd {
margin-right: 40px;
border: 1px solid #ccc;
}
.download.svelte-9q81nd {
margin-top: 2em;
}
.newClient.svelte-o5v00 {
float: right;
}
h2.svelte-o5v00 small.svelte-o5v00 {
display: block;
clear: left;
color: #ccc;
}
.row.svelte-o5v00 {
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: 100%;
}
.col.svelte-o5v00 {
display: flex;
flex-direction: column;
flex-basis: 100%;
flex: 1;
margin-left: 2em;
}
.help.svelte-o5v00 {
flex-basis: 10%;
}
h2.svelte-o5v00 {
margin: 0;
padding: 0;
}
.back.svelte-101labk {
position: fixed;
left: 10px;
top: 70px;
}
@media screen and (max-width: 800px) {
.user.svelte-1bvmsl0 {
display: none;
}
}
footer.svelte-vt2udd {
margin-top: 3em;
border-top: 1px solid #ddd;
text-align: center;
background: #f7f7f7;
}
/*# sourceMappingURL=main.css.map*/
-1
View File
File diff suppressed because one or more lines are too long
-1561
View File
File diff suppressed because it is too large Load Diff
-1
View File
File diff suppressed because one or more lines are too long
-9303
View File
File diff suppressed because it is too large Load Diff
-1
View File
File diff suppressed because one or more lines are too long
-3918
View File
File diff suppressed because it is too large Load Diff
-1
View File
File diff suppressed because one or more lines are too long