improved docker setup (#313)

This commit is contained in:
Denys Vuika 2018-04-17 14:42:35 +01:00 committed by GitHub
parent 5ebcd44723
commit e52f785444
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 110 additions and 41 deletions

9
.dockerignore Normal file
View File

@ -0,0 +1,9 @@
.git
.github
.vscode
coverage
docs
e2e
node_modules
scripts
src

5
.env Normal file
View File

@ -0,0 +1,5 @@
ALFRESCO_TAG=6.0.4-ea
SHARE_TAG=6.0.a
SOLR6_TAG=1.1.0
POSTGRES_TAG=10.1
ACA_TAG=development

View File

@ -1,8 +1,95 @@
version: '3.1'
version: "3"
services:
app:
image: 'alfresco/content-app'
build: '.'
alfresco:
image: alfresco/alfresco-content-repository-community:${ALFRESCO_TAG}
depends_on:
- postgres
environment:
CATALINA_OPTS : "
-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
"
JAVA_OPTS : "
-Ddb.driver=org.postgresql.Driver
-Ddb.username=alfresco
-Ddb.password=alfresco
-Ddb.url=jdbc:postgresql://postgres:5432/alfresco
-Dsolr.host=solr6
-Dsolr.port=8983
-Dsolr.secureComms=none
-Dsolr.base.url=/solr
-Dindex.subsystem.name=solr6
"
networks:
- internal
ports:
- 8080:8080 #Browser port
- 8000:8000 #Debug port
share:
image: alfresco/alfresco-share:${SHARE_TAG}
depends_on:
- alfresco
environment:
- REPO_HOST=alfresco
- REPO_PORT=8080
networks:
- internal
ports:
- 8081:8080
postgres:
image: postgres:${POSTGRES_TAG}
environment:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco
networks:
- internal
ports:
- 5432:5432
solr6:
image: alfresco/alfresco-search-services:${SOLR6_TAG}
depends_on:
- alfresco
environment:
#Solr needs to know how to register itself with Alfresco
- SOLR_ALFRESCO_HOST=alfresco
- SOLR_ALFRESCO_PORT=8080
#Alfresco needs to know how to call solr
- SOLR_SOLR_HOST=solr6
- SOLR_SOLR_PORT=8983
#Create the default alfresco and archive cores
- SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
networks:
- internal
ports:
- 8983:8983 #Browser port
content-app:
image: alfresco/alfresco-content-app:${ACA_TAG}
build: .
depends_on:
- alfresco
networks:
- internal
ports:
- 3001:80
# volumes:
# - ./app.config.json:/usr/share/nginx/html/app.config.json
# - ./nginx.conf:/etc/nginx/conf.d/default.conf
proxy:
image: nginx
depends_on:
- content-app
volumes:
- ./docker-compose/nginx.conf:/etc/nginx/conf.d/default.conf
networks:
- internal
ports:
- 3000:80
networks:
internal:

View File

@ -2,3 +2,4 @@ ALFRESCO_TAG=6.0.4-ea
SHARE_TAG=6.0.a
SOLR6_TAG=1.1.0
POSTGRES_TAG=10.1
ACA_TAG=development

View File

@ -68,7 +68,7 @@ services:
- 8983:8983 #Browser port
content-app:
image: alfresco/alfresco-content-app:development
image: alfresco/alfresco-content-app:${ACA_TAG}
depends_on:
- alfresco
networks:

View File

@ -6,9 +6,10 @@
"ng": "ng",
"start": "npm run server-versions && ng serve --open",
"start:prod": "npm run server-versions && ng serve --prod --open",
"build": "npm run server-versions && ng build",
"start:docker": "docker-compose up --build",
"build": "npm run server-versions && ng build --prod",
"build:prod": "npm run server-versions && ng build --prod",
"build:dev": "npm run server-versions && ng build && node postbuild-dev.js",
"build:dev": "npm run server-versions && ng build",
"build:tomcat": "npm run server-versions && ng build --base-href ./",
"test": "ng test --code-coverage",
"test:ci": "ng test --code-coverage --single-run --no-progress && cat ./coverage/lcov.info | ./node_modules/.bin/codacy-coverage && rm -rf ./coverage",

View File

@ -1,34 +0,0 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2018 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
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)
);