It is a very common requirement to use different set of available port (s) as per company policy rather than using default port (s) for the applications.
Background:
- Update default connector ports 8080, 8443, 8009 and 8005 to required ports.
- Sometimes we use JPDA_ADDRESS for remote debug which is default '8000' in $ALFRESCO_INSTALL_DIR/tomcat/bin/catalina.sh. If we use remote debug, them update to required port as needed.
- Update the required 'alfresco' and 'share' ports in $ALFRESCO_INSTALL_DIR/tomcat/shared/classes/alfresco-global.properties
- Update following properties:
- share.port=<requiredPort>, default : 8080
- alfresco.port=<requiredPort>, default : 8080
- Update the required 'alfresco' ports in $ALFRESCO_INSTALL_DIR/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml for remote configuration (<config evaluator="string-compare" condition="Remote">).
- Update required port in following endpoint urls:
- Update 'alfresco-noauth' endpoint url:
- http://localhost:{REQUIRED_PORT}/alfresco/s --> DEFAULT: 8080
- Update 'alfresco' endpoint url:
- http://localhost:{REQUIRED_PORT}/alfresco/s --> DEFAULT: 8080
- Update 'alfresco-feed' endpoint url:
- http://localhost:{REQUIRED_PORT}/alfresco/s --> DEFAULT: 8080
- Update 'alfresco-api' endpoint url:
- http://localhost:{REQUIRED_PORT}/alfresco/api --> DEFAULT: 8080
- Update the required 'alfresco' port in 'solrcore.properties' file.
- Find the 'alfresco.port' property in solrcore.properties file and update:
- alfresco.port=<requiredPort>, default : 8080
- For SOLR4, we used below paths:
- $ALFRESCO_INSTALL_DIR/solr4/workspace-SpacesStore/conf/solrcore.properties
- $ALFRESCO_INSTALL_DIR/solr4/archive-SpacesStore/conf/solrcore.properties
- For SOLR6 (alfresco-search-service), we used below paths:
- $SOLR_HOME/solrhome/alfresco/conf/solrcore.properties
- $SOLR_HOME/solrhome/archive/conf/solrcore.properties
Change Alfresco, Share, Nginx (Proxy), Solr and Database (postgres) ports with help of DockerFile and docker-compose.yml:
Service |
Default Ports |
Note |
Tomcat connector ports |
8005, 8080, 8443, 8009 |
Default within tomcat shipped with alfresco
and share images. |
alfresco |
8080 |
|
share |
8080 |
|
proxy |
80, 8080 -> 8080 |
Default port on proxy(nginx) is 80, where port
8080 is exposed for providing access to alfresco and share. nginx forwards
requests on 8080 (host port) to alfresco’s and share’s port 8080. We can change the host port to any
other port as well easily. E.g. 81 -> 8080 (Request will come on port 81
which nginx will forward to 8080) |
postgres |
5432 |
|
solr6 |
8083 -> 8983 |
8083 is host port and 8983 is container
port. Alfresco uses 8983 to communicate with solr6. To access solr admin,
administrators use 8083 Access via browser: http://localhost:8083/ |
transform-core-aio |
8090-> 8090 |
Both host and container ports are same
here. Alfresco uses 8090 to communicate with transformation
services. We can use the port 8090 to access the transformation
services via browser. Access via browser: http://localhost:8090/ |
activemq |
8161 -> 8161 # Web Console |
Both host and container ports are same
here. port 8161 can be used for accessing the ‘Web Console’ via browser and alfresco would use the
same port to communicate with activemq. Access WebConsole via browser: http://localhost:8161/ |
- Create a directory 'configs-to-override' in the same directory where you have kept your 'docker-compose.yml' file.
- Under 'configs-to-override' directory, create following directories:
- Create 'alfresco' directory --> It will be used to keep 'DockerFile' for acs image
- Create an empty 'DockerFile' file which we will use to put build instructions for 'alfresco' service
- Create 'share' directory --> It will be used to keep 'DockerFile' for share image
- Create an empty 'DockerFile' file which we will use to put build instructions for 'share' service
- Create 'proxy' directory --> It will be used to keep 'DockerFile' and 'nginx.conf' file for nginx image
- Create an empty 'DockerFile' file which we will use to put build instructions for 'proxy' service
- Create an empty 'nginx.conf' file which we will use to put proxy configuration for services