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.............:)

47 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. herbal incense 2021,
    trusted herbal incense sites 2021,
    k2 liquid incense,
    order cheap herbal incense,
    cheap strong herbal incense,
    super strong herbal incense liquid,
    most potent herbal incense on the market,
    best herbal incense website 2021,
    k2 liquid spray on paper for sale,
    where to buy liquid herbal incense,
    buy herbal incense with debit card,
    buy herbal incense overnight shipping,
    strongest liquid incense,
    buy herbal incense online cash on delivery,
    liquid herbal incense 2020,
    k2 spray that get you high for sale,
    buy herbal net


    https://k2herbalspice.com/
    Call Us: (+1) 747-500-1520
    Email: sales@k2herbalspice.com



    herbal incense 2021,
    trusted herbal incense sites 2021,
    k2 liquid incense,
    order cheap herbal incense,
    cheap strong herbal incense,
    super strong herbal incense liquid,
    most potent herbal incense on the market,
    best herbal incense website 2021,
    k2 liquid spray on paper for sale,
    where to buy liquid herbal incense,
    buy herbal incense with debit card,
    buy herbal incense overnight shipping,
    strongest liquid incense,
    buy herbal incense online cash on delivery,
    liquid herbal incense 2020,
    k2 spray that get you high for sale,
    buy herbal net


    website: https://herbalincensespices.com/
    Call Us: +1 (312)-319-2341
    Email: sales@herbalincensespices.com


    We are located in USA AND UK. Buy High Quality Grade(%99.96) Mephedrone (2- methylamino 1-one) also known as 4-methylmethcathinone(4-MMC).We are one of the top suppliers in wholesale and retail of Benzodiazepine,synthetic cannabinoids, Blotters chemicals. Mephedrone and other plants research chemicals such as: Amphetamines Pentylone Mephedrone Flephedrone Bulytone (bk-MBDB) MDAI Analgesic Chemical CB1 and CB2 CP 47497 CP-55940 HU-210 HU-331 Ephedrine Hcl Powder JWH-018 / JWH-200,JWH-250 TFMPP 2C-E, 2C-I, 2C-P, 2C-C, 2C-T-2 DOC, DOI Bromo DragonFly TCB-2 Testosterone 5-Meo-DMT 4-Aco-DMT 4-Ho-MIPT 4-Meo-PCP Naphyrone HEROIN. Methylone (bk-MDMA) Ethylone , Oxycodone Flephedrone (4-FMC, 4-Fluoromethcathinone) Methedrone (BK-PMMA, Methoxyphedrine) 4-Fluoromethamphetamine (4-FMA) a-Pyrrolidinopropiophenone (a-PPP). MDPV (Methylenedioxypyrovalerone, MDPK) Testosterone JWH-073, 1-butyl-3-(1-naphthoyl)indole Hydrocodone Dimethocaine (Larocaine/DMC) Morphine JWH-018, 1-Pentyl-3-(1-naphthoyl)indole Herione 4-Fluoroamphetamine (4-FA, 4-FMP, or Flux) Ketamine Our quality is the best you can find around and we sell in small/large quantities with guaranteed discreet delivery in good time Shipping

    website: https://uslegitresearchchemicals.com/
    Call Us: +1 760-573-6020
    Email: info@uslegitresearchchemicals.com

    ReplyDelete
  29. 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
  30. 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
  31. This blog was extremely helpfull. I really appreciate your kindness in sharing this with me and everyone else!
    ice o lator

    ReplyDelete