frappe_docker/README.md
2024-05-24 10:21:58 +02:00

4.5 KiB

Getting Started

!! You need to be connected to WSL before proceeding

Other Pre-requisites

To get started you need Docker, docker-compose, and git setup in WSL. For Docker basics and best practices refer to Docker's documentation. After that, clone this repo:

Introduction

You will be working in the ./development folder a.k.a. a dev workspace. Follow the steps below to set up the workspace.

Workspace Setup

  1. Clone the Repo into your working directory
git clone https://github.com/cronos-capital/RAFNAV-Docker.git
cd RAFNAV-Docker
  1. Create the devcontainer and VsCode configuration from the templates provided
cp -R devcontainer-example .devcontainer
cp -R development/vscode-example development/.vscode

Build the Docker Image

Run the following command in your working directory

docker build -t rafnav_bench:latest ./images/rafnav_bench

You may change the tag to the relevant naming convention. However, you need to change the image used for development in the correct docker-compose file: ./.devcontainer/docker-compose.yml

Container Initialization

You have two options to start the docker container for development:

  1. Opening the folder in VS as a docker container.
  2. Manually starting the container in the terminal.

Reopen the folder in the dev container

  1. Open VsCode in the RAFNAV-Docker folder.
  2. Open the command pallet with ctrl + shift + p or View->Command Pallet
  3. Run the command dev containers: Reopen in container
  4. Wait for the container to warm up...

Manually start the container

  1. Run the following script
docker-compose -f .devcontainer/docker-compose.yml up -d && docker exec -e \"TERM=xterm-256color\" -w /workspace/development -it devcontainer-frappe-1 bash

Note: Your terminal is now open in the development workspace. However, the VsCode window is not.

Starting Development

GitHub Login (SSH)

Make sure you're setting it up for Linux

  1. Check for any existing SSH Key
  2. Generate an SSH Key
  3. Add it to your GitHub
  4. Test your connection

RAFNAV Installation

Default Install

frap-install

ERPNext with add-on apps

  frap-install -j apps-erpnext.json

Development Branch Apps Install

  frap-install -j apps-development.json

Prod Apps Install

 frap-install -j apps-prod.json

Note: For additional args and configs run frap-install --help first.

  1. cd into Rafnav's development bench
cd rafnav_bench
  1. Now you are able to start development on RAFNAV with all the dependencies and the correct environment set-up.

Documentation

Default Credentials

MariaDB Root Password: 123

Unless changed in the docker or docker-compose file

First site's Administrator password: admin

Unless changed in the docker or docker-compose file

Production

Development