mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[ACA-1294] docker example for 6.0 community integration (#309)
* docker example for 6.0 community integration * cleanup travis config
This commit is contained in:
parent
5a7af0aecf
commit
bc6f02e261
19
.travis.yml
19
.travis.yml
@ -5,26 +5,9 @@ language: node_js
|
||||
node_js:
|
||||
- "8"
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
install:
|
||||
- npm install -g npm@latest
|
||||
- npm ci
|
||||
|
||||
script:
|
||||
- npm run build
|
||||
- npm run test -- --single-run --no-progress && cat ./coverage/lcov.info | ./node_modules/.bin/codacy-coverage && rm -rf ./coverage
|
||||
|
||||
# Send coverage data to codecov
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash) -X gcov
|
||||
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
|
||||
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"
|
||||
- export TAG=`if [ "$BRANCH" == "master" ]; then echo "latest"; else echo $BRANCH ; fi`
|
||||
- sed -i 's/{:port}/:8080/1' ./dist/app.config.json
|
||||
- docker build -t $DOCKER_REPO:$TAG .
|
||||
# Publish extra image based on Travis build number
|
||||
- docker tag $DOCKER_REPO:$TAG $DOCKER_REPO:travis-$TRAVIS_BUILD_NUMBER
|
||||
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
|
||||
- docker push $DOCKER_REPO
|
||||
- npm run test:ci
|
||||
|
4
docker-compose/.env
Normal file
4
docker-compose/.env
Normal file
@ -0,0 +1,4 @@
|
||||
ALFRESCO_TAG=6.0.4-ea
|
||||
SHARE_TAG=6.0.a
|
||||
SOLR6_TAG=1.1.0
|
||||
POSTGRES_TAG=10.1
|
15
docker-compose/README.md
Normal file
15
docker-compose/README.md
Normal file
@ -0,0 +1,15 @@
|
||||
# ACA with ACS Community 6.0ea
|
||||
|
||||
To run ACA together with the latest ACS community (6.0) use the following command:
|
||||
|
||||
```sh
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
The ACA is served on the port 3000.
|
||||
|
||||
If you want to teardown the environment, use the following command:
|
||||
|
||||
```sh
|
||||
docker-compose down
|
||||
```
|
94
docker-compose/docker-compose.yml
Normal file
94
docker-compose/docker-compose.yml
Normal file
@ -0,0 +1,94 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
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:development
|
||||
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:
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
networks:
|
||||
- internal
|
||||
ports:
|
||||
- 3000:80
|
||||
|
||||
networks:
|
||||
internal:
|
43
docker-compose/nginx.conf
Normal file
43
docker-compose/nginx.conf
Normal file
@ -0,0 +1,43 @@
|
||||
server {
|
||||
listen *:80;
|
||||
|
||||
set $allowOriginSite *;
|
||||
proxy_pass_request_headers on;
|
||||
proxy_pass_header Set-Cookie;
|
||||
|
||||
location / {
|
||||
proxy_pass http://content-app;
|
||||
|
||||
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass_header Set-Cookie;
|
||||
}
|
||||
|
||||
location /alfresco/ {
|
||||
proxy_pass http://alfresco:8080;
|
||||
|
||||
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass_header Set-Cookie;
|
||||
}
|
||||
|
||||
location /share/ {
|
||||
proxy_pass http://share:8080;
|
||||
|
||||
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass_header Set-Cookie;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user