06-19-2019 01:04 AM
I have installed alfresco 6 using docker and its working.
I have made some customization and I want to deploy that as jar in alfresco.
How can I deploy that?
08-12-2019 11:29 AM
It would be better if you could use SDK to build the image with your customization within. Else you will have to manually deploy the jar files/amps/configs every time.
If you attempting to apply amps, You can copy your amp file directly to "$TOMCAT_DIR/amps (/usr/local/tomcat/amps)" and try if that works.
This is what you would see in $TOMCAT_DIR/amps. A Dockerfile and some amps.
If you open Dockerfile in editor, you can see it is trying to apply all the amps:
08-16-2019 10:25 AM
All is working, thanks!
06-19-2019 05:46 AM
See the Alfresco documentation for Alfresco Simple Module's:
Simple Modules are located in the modules/platform or modules/share folder of your Alfresco Content Services installation, depending on whether they are an extension for Platform or Share respectively.
An alternative is adding the jar inside the unpacked Alfresco application, in the following directory:
$TOMCAT_DIR/webapps/alfresco/WEB-INF/lib/
The Alfresco Maven SDK 4 is using the latter approach. (See: Maven SDK 4 docker file)
If you generate your customization project with the Alfresco Maven SDK 4, you'll have a full test docker setup available.
If you are using Gradle as a build tool, you can use the Alfresco Docker Gradle Plugin to easily build custom docker images with Simple Modules / Module Packages installed.
06-19-2019 06:14 AM
I have followed this instruction. https://docs.alfresco.com/6.0/tasks/deploy-docker-compose.html
At which location modules/platform or modules/share will generate?I am using linux.
06-19-2019 07:36 AM
It looks like those paths aren't available inside the container.
I would suggest adding your extension to
$TOMCAT_DIR/webapps/alfresco/WEB-INF/lib/
06-19-2019 08:16 AM
In which file and where I need to add?
06-20-2019 07:56 AM
If you are using SDK4.0.0 and made the custom changes in your code. Then stop the container using ./run.sh stop command
then execute the ./run.sh build_start command again.
If you are using AIO project structure then you have option to refresh the Alfresco and Share individually to load latest changes.
See ./run.bat or ./run.sh file for more commands.
06-20-2019 08:03 AM
It you are not using SDK, then probably you have to ftp your customizations to container and copy them to <tomcat_InstallDir>/webapps/alfresco/WEB-INF/lib directory for repo layer changes and <tomcat_InstallDir>/webapps/share/WEB-INF/lib directory for share layer changes.
Additionally you can copy the extension to <tomcatInstallDir>/shared/classes/alfresco/extension (repo layer)
<tomcatInstallDir>/shared/classes/alfresco/web-extension (share)
folders.
06-21-2019 12:09 AM
Jar deployment approach available or not?
06-21-2019 02:31 PM
JAR and AMP both options are available. It depends which way you have setup your environment. If you are using SDK, it would be easily deployed like mentioned above.
Else copy the jar files manually "$TOMCAT_DIR/webapps/alfresco/WEB-INF/lib (e.g. /usr/local/tomcat/webapps/alfresco/WEB-INF/lib) directory for repo layer changes and $TOMCAT_DIR/webapps/share/WEB-INF/lib (e.g. /usr/local/tomcat/webapps/share/WEB-INF/lib) directory for share layer changes"
Method 1:
Execute following commands from powershell, i am just trying to show how to copy a file to container. Same way you can copy jar files.
#Get container name or short container id:
- docker ps
#Get full container id:
- docker inspect -f '{{.Id}}' SHORT_CONTAINER_ID-or-CONTAINER_NAME
Example: ac23e51fd0b5c4cc11a12133ceea16d603e7f105d8d39873c75d7cfdd5942e40
#Copy file:
- docker cp localFile FULLCONTAINER_ID:smileytongue:athOnContainer
Example:
- docker cp C:\custom-log4j.properties ac23e51fd0b5c4cc11a12133ceea16d603e7f105d8d39873c75d7cfdd5942e40:/usr/local/tomcat/shared/classes/alfresco/extension
Once you are done copying the file, restart the container.
Method 2:
SSH into the container and copy the jar file as needed....
#Get container name or short container id:
- docker ps
#SSH into the container using container name or container id
- docker exec -t -i docker_acs6-aio-demo-project-acs_1 /bin/bash
You can execute all Linux commands here... i am logged into alfresco container. Once you are done copying file into alfresco container, do the same steps as given above for share to copy your customization.
07-26-2019 10:57 AM
Same question. What path to upload simple module (with config, META-INF folders etc) into the alfresco docker container?
Explore our Alfresco products with the links below. Use labels to filter content by product module.