Installation of Frappe Using Docker(Production)

  1. Git Clone the Infra Utils Repository using command:

    git clone https://github.com/techfinite-org/Infra-Utils.git
  2. Get into Infra Utils directory using command:

    cd Infra-Utils
  3. Install Docker and Docker Compose using Script FIle. To run the Script File give the command:

    ./install_docker.sh
  4. Install MariaDB using Script File. To run the Script File give the command:

    ./install_mariadb.sh
  5. While Installing MariaDB, it will ask whether to change the root password. Type "yes" and give the New Password for Root. It will ask some other questions like deleting Test user and Test Databases, Reload the privileges.

  6. Open traefik.env in any Editor. For vi editor use:

    vi traefik.env
  7. Replace the Environment variable with your own environment variable.

  8. To up the Traefik. Use the command:

    docker compose -f traefik.yaml --env-file traefik.env up -d
  9. To check the Traefik, open any browser and type the Traefik host name. It will show pop up asking Username and Password. Type Username as 'admin' and Password you given in env file.

  10. After the Traefik is up, we can deploy the docker instance.

  11. Get into docker-production using command:

    cd docker-production
  12. Open local.env in any Editor. For vi editor use:

    vi prod.env
  13. Replace the Environment variable with your own environment variable.

  14. To up the docker instance. You have to create directory for sites and redis in Host and have to bind that volume. For that Create the directories sites and redis. To create run the command:

    mkdir sites redis
  15. To create the volume that bind the sites and redis directory run the command:

    docker volume create --driver local --opt type=none --opt device=your_sites_directory_path --opt o=bind sites
    
    docker volume create --driver local --opt type=none --opt device=your_redis_directory_path --opt o=bind redis
  16. After run the command to up the docker instance:

    docker compose -f docker-compose-production.yaml --env-file prod.env up -d
  17. Now you will get the Frappe Instances. Next you have to create the site. For that run the command:

    ./create_site_docker.sh
  18. It will ask to enter Project Name, Site Name, DB Name, DB Root Username, DB Root Password. After the you will get site.

  19. Open any browser and enter the site name you have created to access the site.