In my previous blog we talked about setting up docker with Liferay and MySQL!
In this blog we will integrate SMTP server inside docker and setup mount for document_library.
We will go through content of Dockerfile which we cloned from repo and made necessary changes.
Few terms we need to understand before jumping to the setup
Dockerfile : Docker can build images automatically by reading the instructions from a
Volume : A data volume is a specially-designated directory within one or more containers that bypasses the Union File System.
Mount : A mount point is a directory in a file system where additional information is logically connected from a storage location outside the operating system’s root drive and partition.
Cool, Let's move forward and have a look on docker-compose.yml
This is the same file which we used earlier with addition of mail server setup and mounting document library.
We are using million12/citadel repository for SMTP server. There are so may smtp server available in docker hub but this is a easy one with web ui and authentication support.
As you can see in yml file we have added one more dependency service mail-server. We have exposed ports for smtp, ssl, web ui etc. hostname is your mail extension here.
So you create a user inside smtp server with web support which is available on port 9090, e.g. 192.168.99.100:9090
You can login as admin/admin for administrator account or create user from outside with Register New User link, e.g. vipin.bardia@mail.vipin.org.
Use the same user and create that account in Liferay portal and check on the same mail id if you get a welcome mail like this or not.
Amazing, now you have your own SMTP server with few lines of configuration :)
Let's talk about Volume and Mount again. I've already shared there definition above so will go through the use of it in our case.
Let's say I want to move my server to somewhere else, what is required other than database?
It's my documents which is stored in data/document_library folder.
So what can I do about this?
As you can see here ./data/document_library is my local folder where [.] represents current directory and /usr/local/liferay-ce-portal-7.0-ga3/data/document_library is my document library folder which is separated by [:] this line creates a volume inside docker container and mount it our local folder.
Whenever we upload anything like this in Liferay
It will be synced to our local folder like this
In the same manner we mount deploy folder and as soon as we drop the file war/jar inside it, it is copied to volume deploy folder and starts deployment.
In this blog we will integrate SMTP server inside docker and setup mount for document_library.
We will go through content of Dockerfile which we cloned from repo and made necessary changes.
Few terms we need to understand before jumping to the setup
Dockerfile : Docker can build images automatically by reading the instructions from a
Dockerfile
. A Dockerfile
is a text document that contains all the commands a user could call on the command line to assemble an image. Using docker build
users can create an automated build that executes several command-line instructions in succession.Volume : A data volume is a specially-designated directory within one or more containers that bypasses the Union File System.
Mount : A mount point is a directory in a file system where additional information is logically connected from a storage location outside the operating system’s root drive and partition.
Cool, Let's move forward and have a look on docker-compose.yml
version: '2' services: portal: build: . ports: - "8080:8080" - "11311:11311" environment: - MYSQL_ROOT_PASSWORD=my-secret-pw - MYSQL_DATABASE=lportal - MAIL_SERVER=mail-server - MAIL_SERVER_SMTP_PORT=25 - MAIL_SERVER_USER_FROM=admin@mail.vipin.org - MAIL_SERVER_USER_FROM_PASSWORD=admin - MAIL_SERVER_AUTH=true volumes: - "./data/deploy:/usr/local/liferay-ce-portal-7.0-ga3/deploy" - "./data/document_library:/usr/local/liferay-ce-portal-7.0-ga3/data/document_library" depends_on: - mysql - mail-server mail-server: image: million12/citadel ports: - "25:25" - "110:110" - "143:143" - "465:465" - "587:587" - "993:993" - "995:995" - "9090:8080" - "10022:22" environment: - ROOT_PASS=root - PASSWORD=admin - DOMAIN=vipin.org hostname: mail.vipin.org mysql: image: mdelapenya/mysql-utf8 ports: - "3306:3306" environment: - MYSQL_ROOT_PASSWORD=my-secret-pw - MYSQL_DATABASE=lportal - character-set-server=utf8mb4 - collation-server=utf8mb4_unicode_ci
This is the same file which we used earlier with addition of mail server setup and mounting document library.
SMTP
We are using million12/citadel repository for SMTP server. There are so may smtp server available in docker hub but this is a easy one with web ui and authentication support.
As you can see in yml file we have added one more dependency service mail-server. We have exposed ports for smtp, ssl, web ui etc. hostname is your mail extension here.
So you create a user inside smtp server with web support which is available on port 9090, e.g. 192.168.99.100:9090
You can login as admin/admin for administrator account or create user from outside with Register New User link, e.g. vipin.bardia@mail.vipin.org.
Use the same user and create that account in Liferay portal and check on the same mail id if you get a welcome mail like this or not.
Amazing, now you have your own SMTP server with few lines of configuration :)
Document Library
Let's talk about Volume and Mount again. I've already shared there definition above so will go through the use of it in our case.
Let's say I want to move my server to somewhere else, what is required other than database?
It's my documents which is stored in data/document_library folder.
So what can I do about this?
- "./data/deploy:/usr/local/liferay-ce-portal-7.0-ga3/deploy" - "./data/document_library:/usr/local/liferay-ce-portal-7.0-ga3/data/document_library"
As you can see here ./data/document_library is my local folder where [.] represents current directory and /usr/local/liferay-ce-portal-7.0-ga3/data/document_library is my document library folder which is separated by [:] this line creates a volume inside docker container and mount it our local folder.
Whenever we upload anything like this in Liferay
It will be synced to our local folder like this
In the same manner we mount deploy folder and as soon as we drop the file war/jar inside it, it is copied to volume deploy folder and starts deployment.
Dockerfile: These are instruction which is executed step by step to create a new image.
FROM mdelapenya/liferay-portal:7-ce-ga3-tomcat-hsql MAINTAINER Manuel de la Peña <manuel.delapenya@liferay.com> COPY ./configs/portal-ext.properties $LIFERAY_HOME/portal-ext.properties ENTRYPOINT ["catalina.sh", "run"]
- Fetch image from repository
- Information about Maintainer
- Copy portal-ext to docker image at specified path
- $LIFERAY_HOME is environment variable
- Entrypoint will execute catalina
You are just done, Try & Enjoy the function.............:)
This is only the data I am discovering all over the place. A debt of gratitude is in order for your website, I simply subscribe your online journal. This is a decent blog.. dokument
ReplyDeleteNice article, which you have described very well about the service. Your article is very useful for those who are looking to SMTP Server for Bulk Email at the affordable price. thanks for sharing...
ReplyDeleteGreat Article
ReplyDeleteB.Tech Final Year Projects for CSE in Angular
Angular Training in Chennai
Project Centers in Chennai
JavaScript Training in Chennai
There are so many different types of pallet jacks to choose from it can be tricky but should you decide to opt for the Yale manual pallet jack to get your potential empire off the ground. A comfort with these and other top brands such as; Online Docker Training
ReplyDeleteSome truly wonderful work on behalf of the owner of this internet site , perfectly great articles .
ReplyDeleteReal Weed For Sale
Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. internal audit tracking software
ReplyDeletebuy gorilla glue online
ReplyDeletebuy ak 47 cannabis online
buy sour diesel online
buy OG Kush weed online
buy weed online
buy hybrid marijuana online
buy gorilla glue online
ReplyDeletebuy ak 47 cannabis online
buy sour diesel online
buy OG Kush weed online
buy weed online
buy hybrid marijuana online
You have done a great job on this article. It’s very readable and highly intelligent. You have even managed to make it understandable and easy to read. You have some real writing talent. Thank you.
ReplyDeleteoxycodone hcl
I haven’t any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us. mapsjar.com
ReplyDeletebuy weed online buy pain pills online buy research chemicals online buy heroin online buy cocaine online Buy Cocaine online buy bio cocaine online
ReplyDeleteI admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much. click here
ReplyDeleteI would like to say that this blog really convinced me to do it! Thanks, very good post. online business listings management
ReplyDeletehttps://k2incenseonlineheadshop.com/
ReplyDeleteinfo@k2incenseonlineheadshop.com
Buy liquid incense cheap
Buy liquid incense cheap For Sale At The Best Incense Online Shop
K2 Spice Spray | Liquid K2 | Liquid Spice | K2 Spray for sale
Very nice article, I enjoyed reading your post, very nice share, I want to twit this to my followers. Thanks!. Financial management
ReplyDeleteMua vé tại đại lý vé máy bay Aivivu, tham khảo
ReplyDeletemua ve may bay di my
vé máy bay về việt nam từ mỹ
các đường bay từ canada về việt nam
vé máy bay từ tokyo vé hà nội
vé máy bay từ hàn quốc về việt nam
Vé máy bay từ Đài Loan về VN
khách sạn cách ly ở hà nội
Both of these weed eater blades are effective and fairly inexpensive. The plastic blades can be break easily, particularly if it is ground up against the driveway. buy weed online
ReplyDeleteI appreciated your work very thanks
ReplyDeleteweed online uk, zombie sticks uk
This blog was extremely helpfull. I really appreciate your kindness in sharing this with me and everyone else!
ReplyDeleteice o lator
Excellent and very exciting site. Love to watch. Keep Rocking. https://www.sacstart.org
ReplyDeleteThanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. IT support London
ReplyDeleteThank you so much for sharing this great blog.Very inspiring and helpful too.Hope you continue to share more of your ideas.I will definitely love to read. IT consultancy London
ReplyDeleteIt was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing. Mortgages
ReplyDeleteThis is a good post. This post gives truly quality information. I’m definitely going to look into it. Really very useful tips are provided here. Thank you so much. Keep up the good works. renew mortgage
ReplyDeleteThanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. Mortgages
ReplyDeleteThank you so much for sharing this great blog.Very inspiring and helpful too.Hope you continue to share more of your ideas.I will definitely love to read. renew mortgage
ReplyDeleteIt was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing. IT support London
ReplyDeleteThis is a good post. This post gives truly quality information. I’m definitely going to look into it. Really very useful tips are provided here. Thank you so much. Keep up the good works. IT consultancy London
ReplyDeleteIt was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing. Alcoholics Anonymous
ReplyDeleteYou have a good point here!I totally agree with what you have said!!Thanks for sharing your views...hope more people will read this article!!! Alternative Funding
ReplyDeleteI really loved reading your blog. It was very well authored and easy to understand. Unlike other blogs I have read which are really not that good.Thanks alot! Business Capital Loans
ReplyDeleteI'm glad to see the great detail here!. AA Meeting
ReplyDeleteI am very much pleased with the contents you have mentioned. I wanted to thank you for this great article. rebrand
ReplyDeleteI loved your blog post. Really looking forward to read more.
ReplyDeleteTransfer large files
I really loved reading your blog. It was very well authored and easy to understand. Unlike other blogs I have read which are really not that good.Thanks alot! US Business Funding
ReplyDeleteThank you for helping people get the information they need. Great stuff as usual. Keep up the great work!!! Merchant Cash Advance
ReplyDeleteI can set up my new idea from this post. It gives in depth information. Thanks for this valuable information for all,.. Houston Texas business loans
ReplyDeleteI can set up my new idea from this post. It gives in depth information. Thanks for this valuable information for all,.. cannabusiness loan
ReplyDeleteI exactly got what you mean, thanks for posting. And, I am too much happy to find this website on the world of Google. cannabis business loan
ReplyDeleteOpening a California medical marijuana dispensary means that you have done your homework and know what it takes to open the dispensary according to the laws of your state. 420
ReplyDeleteThank you again for all the knowledge you distribute,Good post. I was very interested in the article, it's quite inspiring I should admit. I like visiting you site since I always come across interesting articles like this one.Great Job, I greatly appreciate that.Do Keep sharing! Regards,
ReplyDeleteOrder Adderall 30mg Online
Hi, I appreciate your speculating as it arouses people’s concern today and lets this topic be discussable. We all know about it here.Best Mortgage Rate in Burlington
ReplyDeleteA considerable lot of them are likewise furnished with OCR highlight and in this caring you can make an editable text out of filtered PDF records. PDF to PNG
ReplyDeleteReally enjoyed reading your blog
ReplyDeleteKeep sharing good information
ReplyDeleteWe are always with you
ReplyDelete