Namran Hussin SoftwareDevelopment Docker-compose for joomla development with mysql and redis

Docker-compose for joomla development with mysql and redis

Let’s say you just want to have Joomla with its Mysql and also redis infrastructure ready.
And don’t want to bother setting it up manually for each services.

Just make a docker-compose.yaml with the following content and then start it up.


version: '3.1'

services:
  web:
    image: joomla
    restart: always
    links:
      - db:mysql
      - redis:cache
    ports:
      - "80:80"
    volumes:
      - "./html:/var/www/html"
      - "./php/php.ini:/usr/local/etc/php/php.ini"
    environment:
        JOOMLA_DB: ${MYSQL_DB}
        JOOMLA_DB_HOST: db
        JOOMLA_DB_PASSWORD: ${MYSQL_ROOT_PASSWORD}

  db:
    image: mysql:5.6
    ports:
      - "3306:3306"
    restart: always
    volumes:
      - "./mysql:/var/lib/mysql"
    environment:
        MYSQL_DATABASE: ${MYSQL_DB}
        MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}

  redis:
    image: redis
    container_name: cache
    ports:
        - "6379:6379"
    restart: always    

then create an .env file with the content for above parameters.


MYSQL_ROOT_PASSWORD=password # set to whatever here
MYSQL_DB=dbname # set approriate database name here

If you have an pre-compiled quickstart file, just extract it into `html` folder.

Then just start the docker with


docker-compose up -d

During install process at http://localhost/installation
just enter the password and db name credential similar to what have been defined in `.env` file.

42 thoughts on “Docker-compose for joomla development with mysql and redis”

  1. I bloog ooften and I truly thhank yoou for yyour information. Your article
    has truily peeaked mmy interest. I am goinng to book mark your ssite andd keeep checking
    foor neew details about once a week. I subscribed to your Feeed aas
    well.

  2. I’m extremely inspired with your writing abilities as neatly as
    with the structure for your weblog. Is that this a paid subject or did you customize it yourself?
    Anyway stay up the nice quality writing, it is rare to peer a great weblog like
    this one these days. Instagram Auto follow!

  3. I am extremely impressed along with your writing talents and also with the layout on your weblog. Is that this a paid subject or did you modify it yourself? Either way stay up the nice high quality writing, it’s uncommon to peer a great weblog like this one these days!

Leave a Reply to tremolitic Cancel reply

Your email address will not be published. Required fields are marked *

Related Post