mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
production build setup
This commit is contained in:
parent
e0efdeb12b
commit
d10255b843
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM nginx
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
WORKDIR /usr/share/nginx/html
|
||||
COPY dist/ .
|
||||
|
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
app:
|
||||
image: 'alfresco/content-app'
|
||||
build: '.'
|
||||
ports:
|
||||
- 3000:80
|
27
nginx.conf
Normal file
27
nginx.conf
Normal file
@ -0,0 +1,27 @@
|
||||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1000;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
location / {
|
||||
# If you want to enable html5Mode(true) in your angularjs app for pretty URL
|
||||
# then all request for your angularJS app will be through index.html
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
}
|
||||
}
|
@ -5,7 +5,8 @@
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --open",
|
||||
"build": "ng build",
|
||||
"build": "ng build --prod",
|
||||
"build:dev": "ng build && node postbuild-dev.js",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e",
|
||||
|
26
postbuild-dev.js
Normal file
26
postbuild-dev.js
Normal file
@ -0,0 +1,26 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2017 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var fs = require('fs');
|
||||
var config = require('./dist/app.config.json');
|
||||
|
||||
config.ecmHost = 'http://localhost:8080';
|
||||
|
||||
fs.writeFileSync(
|
||||
'./dist/app.config.json',
|
||||
JSON.stringify(config, null, 4)
|
||||
);
|
@ -46,7 +46,6 @@ import { SidenavComponent } from './components/sidenav/sidenav.component';
|
||||
imports: [
|
||||
BrowserModule,
|
||||
RouterModule.forRoot(APP_ROUTES, {
|
||||
useHash: true,
|
||||
enableTracing: false // enable for debug only
|
||||
}),
|
||||
AdfModule,
|
||||
|
Loading…
x
Reference in New Issue
Block a user