Featured post

Docker setup for Liferay 7 with MySQL

Wednesday, 5 April 2017

Docker setup for Liferay 7 with SMTP, document library and more as Part II

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 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 : 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"]


  1. Fetch image from repository
  2. Information about Maintainer
  3. Copy portal-ext to docker image at specified path
  4. $LIFERAY_HOME is environment variable
  5. Entrypoint will execute catalina


You are just done, Try & Enjoy the function.............:)

79 comments:

  1. AWS Training in Bangalore - Live Online & Classroom
    myTectra Amazon Web Services (AWS) certification training helps you to gain real time hands on experience on AWS. myTectra offers AWS training in Bangalore using classroom and AWS Online Training globally. AWS Training at myTectra delivered by the experienced professional who has atleast 4 years of relavent AWS experince and overall 8-15 years of IT experience. myTectra Offers AWS Training since 2013 and retained the positions of Top AWS Training Company in Bangalore and India.

    IOT Training in Bangalore - Live Online & Classroom
    IOT Training course observes iot as the platform for networking of different devices on the internet and their inter related communication. Reading data through the sensors and processing it with applications sitting in the cloud and thereafter passing the processed data to generate different kind of output is the motive of the complete curricula. Students are made to understand the type of input devices and communications among the devices in a wireless media.

    ReplyDelete
  2. 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

    ReplyDelete
  3. Nice blog..! I really loved reading through this article. Thanks for sharing such a
    amazing post with us and keep blogging... best angularjs training institute in chennai | angularjs training in omr | angular 4 training in chennai | angularjs training in omr

    ReplyDelete
  4. Nice 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...

    ReplyDelete

  5. Best Article buy Pain Pills online Excellent post. I appreciate this site. Stick with it! Because the admin of this web page is working, no doubt very quickly it will be well-known, due to its quality contents.This website was how do you say it? Relevant!! Finally, I’ve found something that helped me.
    Best Article buy Roxicodone online Excellent post
    buy Xanax online
    buy Oxycodone online

    Best Article buy Pain Medications online Excellent post. I appreciate this site. Stick with it! Because the admin of this web page is working, no doubt very quickly it will be well-known, due to its quality contents.This website was how do you say it? Relevant!! Finally, I’ve found something that helped me.

    buy Research Chemicals online

    buy Roxicodone online

    buy Cbd Isolate online

    ReplyDelete
  6. Thanks a lot for sharing
    Having good health is what most people out there wants but can not achieve. some people takes buy ibogaine online AND buy weed online to get it.

    ReplyDelete
  7. medical care is what many people lack in the interior areas of the world. people face a lot of health issues everyday without solution. buy psychedelics online, Buy weed online, Buy fantanyl patches online

    ReplyDelete

  8. lovely site get you purest research chemicals online and pills at cheap and in a 48 hours delivery time maximum
    buy pills online
    buy fentanyl powder online
    buy scopolamine powder online

    ReplyDelete
  9. 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

    ReplyDelete
  10. Some truly wonderful work on behalf of the owner of this internet site , perfectly great articles .
    Real Weed For Sale

    ReplyDelete
  11. It's very useful blog post with informative and insightful content and i had good experience with this information.I have gone through CRS Info Solutions Home which really nice. Learn more details About Us of CRS info solutions. Here you can see the Courses CRS Info Solutions full list.Find the best Hadoop Training with great faculty. Go to know about crs info solutions Workday Training program.

    ReplyDelete
  12. 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

    ReplyDelete
  13. 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.
    oxycodone hcl

    ReplyDelete
  14. 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

    ReplyDelete
  15. I 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

    ReplyDelete
  16. I would like to say that this blog really convinced me to do it! Thanks, very good post. online business listings management

    ReplyDelete
  17. Wow! By the help of this course my brand name will surely be a big hit! Thank you for the wonderful service, truly helpful! business people

    ReplyDelete
  18. https://k2incenseonlineheadshop.com/
    info@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

    ReplyDelete
  19. Thanks for sharing What an interesting site you have i really take a good look buy cocaine online and you can also take a good look at our blog too for more information buy crack cocaine online we also recommend you to take a good look at this site too they have good content buy mdma crystals online more of the site still want you to take a closer look too as they have really good content buy crystal meth online thanks for using your time to check on the link .order cocaine online

    ReplyDelete
  20. We have notice some very good content here and we nice reading.buy cocaine online and we also want us to read this blog post .order cocaine online if you want to know more about .buy dilaudid online you should read here for more .order dilaudid online to make a blog site is not easy so read here how to make blog site .buy peruvian cocaine online with free hosting and more site too.

    ReplyDelete
  21. https://bestmjstrainsonline.com/

    Buy liquid incense cheap | cheap herbal incense | buy k2 E liquid | k2 spray
    Description
    Buy liquid incense cheap . cheap herbal incense . buy k2 E liquid . buy k2 paper spray online . buy herbal incense online . buy k2 spice online

    Buy K2 Infused paper spray online, order K2 Spray online +1 (925) 526-5453

    https://bestmjstrainsonline.com/product/5-co2-cannabis-oil-cartridges/



    ReplyDelete
  22. https://syntheticworldwide.com/
    sales@syntheticworldwide.com

    Buy cheap liquid herbal incense at your best online shop

    ReplyDelete
  23. What an amazing blog you have here Cocaine for Sale thank you for sharing this real good content buy colombian cocaine online will like to also say we have an amazing blog too if you will love to take a look buy peruvian cocaine online thanks for your time to check on our blog. Today cocainehydrochloride is one of the world-leading buy cocaine online manufacturers in the USA . for you to order cocaine online , there is a variety of cocaine websites you can purchase and have it delivered Worldwide . And Yes, you can buy crack cocaine online illegal drugs on the Internet, and it's a lot safer .

    ReplyDelete
  24. What a good blog you have here on how to buy Vyvanse online medication. There are many order Vyvanse online
    pharmacy websites that operate legally such as buy adderall XR online and offer convenience, privacy, and safeguards for purchasing buy oxycodone online medications. Also, these medicines may not have been stored properly . So always look out Buy Keifeitropin 140iu Online for details .

    ReplyDelete
  25. Very nice article, I enjoyed reading your post, very nice share, I want to twit this to my followers. Thanks!. Financial management

    ReplyDelete
  26. What a great content we have here buy marijuana online as we browse we also see this blog too and is pretty good buy weed online we also realize that blog are good for business we also bring buy moonrocks online best blog to visit
    cannabis blog thanks for checking on this post

    ReplyDelete


  27. https://buydocumentation.com/

    Buy Driver’s License online, US driver license, drivers license renewal ca WhatsApp +1 (925) 526-5453


    Here at Buy Documentation, you can buy fake documents at a fraction of a cost. We keep our prices low to meet the needs of all our customers. We provide Best Quality Novelty Real and Fake IDs and Passport, Marriage Certificates and Drivers license online

    https://buydocumentation.com/canada-visa/

    https://buydocumentation.com/buy-real-drivers-license/

    https://buydocumentation.com/buy-real-id-cards/

    https://buydocumentation.com/social-security-number-ssn/

    ReplyDelete
  28. I really happy found this website eventually. Really informative and inoperative, Thanks for the post and effort! Please keep sharing more such blog.
    Data Science Course in Pune
    Python Classes in Pune

    ReplyDelete
  29. 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

    ReplyDelete
  30. This blog was extremely helpfull. I really appreciate your kindness in sharing this with me and everyone else!
    ice o lator

    ReplyDelete
  31. IBOGA DEALS
    Are you suffering from drugs opiates/opioids, cigarette,Alcohol and other adictions and you are looking for a good means to detoxification? We supply high quality and purity ket and iboga in all it's from (iboga TA,Ibogaine HCL, Iboga roorbarks, iboga powder,iboga Capsules
    Buy iboga-root-bark-chips-shavings Online
    Buy ibogaine-hcl-1gram Online
    Email: ibogadeals@gmail.com/sales@ibogadeals.com
    what'sapp number: +1(631)3174860
    website: https://www.ibogadeals.com/

    ReplyDelete
  32. Excellent and very exciting site. Love to watch. Keep Rocking. https://www.sacstart.org

    ReplyDelete
  33. Thanks 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

    ReplyDelete
  34. Thank 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

    ReplyDelete
  35. It 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

    ReplyDelete
  36. This 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

    ReplyDelete
  37. Thanks 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

    ReplyDelete
  38. Thank 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

    ReplyDelete
  39. It 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

    ReplyDelete
  40. This 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

    ReplyDelete
  41. Thanks for the blog article.Much thanks again. Fantastic.
    devops online training
    devops training

    ReplyDelete
  42. to the medical condition of most patients. many people suffering from cancer, chronic pain, anxiety and man more have overcome their illment with cannabis. you can order weed from our store





    ReplyDelete
  43. marijuana has been a stepping stone to the medical condition of most patients.
    many people suffering from cancer, chronic pain, anxiety, and many more have overcome their aillment with cannabis.
    you can order weed from our store.medical condition

    ReplyDelete
  44. It 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

    ReplyDelete
  45. You 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

    ReplyDelete
  46. 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! Business Capital Loans

    ReplyDelete
  47. I'm glad to see the great detail here!. AA Meeting

    ReplyDelete
  48. I am very much pleased with the contents you have mentioned. I wanted to thank you for this great article. rebrand

    ReplyDelete
  49. Thanks 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. name a business

    ReplyDelete
  50. I loved your blog post. Really looking forward to read more.
    Transfer large files

    ReplyDelete
  51. 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

    ReplyDelete
  52. Don't let anxiety cause you to develop phobias or false deceptions in your life. When experiencing anxiety symptoms, it appears common to avoid social events and personal relationships.As a result, obtain treatment for your anxiety illness before it causes problems in your personal and professional life
    https://www.researchchemslab.com/

    ReplyDelete
  53. Thank you for helping people get the information they need. Great stuff as usual. Keep up the great work!!! Merchant Cash Advance

    ReplyDelete
  54. Don't let anxiety cause you to develop phobias or false deceptions in your life. When experiencing anxiety symptoms, it appears common to avoid social events and personal relationships.https://www.researchchemslab.com/

    ReplyDelete
  55. Buy Meth Online. Crystal mеth iѕ the common name fоr сrуѕtаl methamphetamine, a ѕtrоng аnd highly addictive drug that affects the central nеrvоuѕ ѕуѕtеmhttps://refinedresearchchemstore.com/index.php/product/buy-crystal-meth-online/

    ReplyDelete
  56. I 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

    ReplyDelete
  57. I can set up my new idea from this post. It gives in depth information. Thanks for this valuable information for all,.. cannabusiness loan

    ReplyDelete
  58. I 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

    ReplyDelete
  59. Opening 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

    ReplyDelete
  60. Thank 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,
    Order Adderall 30mg Online

    ReplyDelete
  61. 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

    ReplyDelete

  62. Buy Meth Online. Crystal mеth iѕ the common name fоr сrуѕtаl methamphetamine, a ѕtrоng аnd highly addictive drug that affects the central nеrvоuѕ ѕуѕtеm. meth for sale, buy meth, buy crystal meth online, buy methamphetamine online, crystal meth online, buy crystal meth, order meth online

    ReplyDelete