added ci build
This commit is contained in:
parent
a4542f7abd
commit
a7aceff686
4 changed files with 28 additions and 1 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
node_modules/
|
18
.drone.yml
Normal file
18
.drone.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: node
|
||||
commands:
|
||||
- npm install
|
||||
- npm run build:ssr
|
||||
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: samuelph/grafana-statuspage
|
||||
username:
|
||||
from_secret: USERNAME
|
||||
password:
|
||||
from_secret: PASSWORD
|
7
Dockerfile
Normal file
7
Dockerfile
Normal file
|
@ -0,0 +1,7 @@
|
|||
FROM node
|
||||
|
||||
COPY dist/grafana-statuspage /grafana-statuspage
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENTRYPOINT ["node", "/grafana-statuspage/server/main.js"]
|
|
@ -8,11 +8,12 @@ import {AppServerModule} from './src/main.server';
|
|||
import {APP_BASE_HREF} from '@angular/common';
|
||||
import {existsSync} from 'fs';
|
||||
import {api} from './src/main.status';
|
||||
import {environment} from "./src/environments/environment";
|
||||
|
||||
// The Express app is exported so that it can be used by serverless Functions.
|
||||
export function app() {
|
||||
const server = express();
|
||||
const distFolder = join(process.cwd(), 'dist/grafana-statuspage/browser');
|
||||
const distFolder = environment.production ? '/grafana-statuspage/browser' : join(process.cwd(), 'dist/grafana-statuspage/browser');
|
||||
const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';
|
||||
|
||||
// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
|
||||
|
|
Reference in a new issue