Skip to content
Permalink
Browse files

Dockerfile, docker-compose etc.

  * Some code fixes due to `ng build --prod` errors
  • Loading branch information
AvrahamO committed Jun 20, 2018
1 parent 1ed9da6 commit 07da56a89425f90446552998856f045f6520d6bd
@@ -0,0 +1,4 @@
.git/
dist/
examples/
node_modules/
@@ -0,0 +1,9 @@
FROM node:8

WORKDIR /usr/src/app
ADD . /usr/src/app

RUN yarn
RUN yarn build

CMD ["yarn", "serve"]
@@ -0,0 +1,19 @@
version: '3'

services:
app:
build: ./
image: odmp
expose:
- 80
environment:
NODE_ENV: production
SERVER_PORT: 80
JWT_SECRET: 0a6b944d-d2fb-46fc-a85e-0295c986cd9f
MONGO_HOST: mongodb://mongo/odmp
restart: always
depends_on:
- mongo

mongo:
image: mongo:3.6
@@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"ng": "ng",
"serve": "node server",
"start": "concurrently -c 'yellow.bold,green.bold' -n 'SERVER,BUILD' 'nodemon server' 'ng build --watch'",
"build": "ng build --prod",
"test": "ng test",
@@ -6,6 +6,7 @@ import { DragulaModule } from 'ng2-dragula';
/* Modules */
import { SharedModule } from '../shared/shared.module';
import { DashboardRoutingModule } from './dashboard-routing.module';
import { NgStringPipesModule } from 'angular-pipes';

/* Components */
import { DashboardComponent } from './dashboard.component';
@@ -29,7 +30,6 @@ import { EntityService } from './services/entity.service';
import { SchemaService } from './services/schema.service';

/* Pipes */
import { ReplacePipe } from 'angular-pipes';
import { FilterDragulaListPipe } from './pipes/filter-dragula-list.pipe';

@NgModule({
@@ -40,6 +40,7 @@ import { FilterDragulaListPipe } from './pipes/filter-dragula-list.pipe';
TreeModule,
DragulaModule,
DynamicFormModule,
NgStringPipesModule,
],
declarations: [
DashboardComponent,
@@ -49,7 +50,6 @@ import { FilterDragulaListPipe } from './pipes/filter-dragula-list.pipe';
EntitiesTreeComponent,
InlineEditComponent,
SidebarSystemComponent,
ReplacePipe,
InlineEditTextareaComponent,
SearchBoxComponent,
FilterDragulaListPipe,
@@ -1,16 +1,16 @@
<header>
<mat-toolbar color="primary">
<a [routerLink]="['/']" class="logo"></a>
<span class="example-spacer"></span>
<a class="links side" [routerLink]="['/auth/login']" *ngIf="!user">Login</a>
<div>
<a class="links side" *ngIf="user" [matMenuTriggerFor]="menu">
<mat-icon>account_circle</mat-icon>{{user.fullname}}
</a>
<mat-menu #menu="matMenu">
<button mat-menu-item *ngIf="user && user.isAdmin" [routerLink]="['/admin']">admin</button>
<button mat-menu-item (click)="logout()">logout</button>
</mat-menu>
</div>
</mat-toolbar>
</header>
<mat-toolbar color="primary">
<a [routerLink]="['/']" class="logo"></a>
<span class="example-spacer"></span>
<a class="links side" [routerLink]="['/auth/login']" *ngIf="!user">Login</a>
<div>
<a class="links side" *ngIf="user" [matMenuTriggerFor]="menu">
<mat-icon>account_circle</mat-icon>{{user.fullname}}
</a>
<mat-menu #menu="matMenu">
<button mat-menu-item *ngIf="user && user.isAdmin" [routerLink]="['/admin']">admin</button>
<button mat-menu-item (click)="logout()">logout</button>
</mat-menu>
</div>
</mat-toolbar>
</header>
@@ -10,7 +10,7 @@ import { AuthService } from '../auth/auth.service';
})
export class HeaderComponent implements OnInit {

@Input() user: Object = {};
@Input() user: any = {};

constructor(
private authService: AuthService,
@@ -1,4 +1,8 @@
<div>
<button mat-raised-button (click)="openUploadDialog()" [disabled]="user && !user.isAdmin">Upload new schema</button>

<button
mat-raised-button
(click)="openUploadDialog()"
[disabled]="user && !user.isAdmin">
Upload new schema
</button>
</div>
@@ -13,7 +13,7 @@ export class SchemaComponent implements OnInit {

constructor(public dialog: MatDialog, public uploadService: UploadService, private authService: AuthService) {}

user: Object;
user: any;

public openUploadDialog() {
let dialogRef = this.dialog.open(DialogComponent, { width: '50%', height: '50%' });

0 comments on commit 07da56a

Please sign in to comment.
You can’t perform that action at this time.