Docker environment for developing, deploying, and running Frappe applications (ERPNext and custom apps) in production and development
Find a file
2025-04-08 14:47:30 +02:00
.github chore(deps): bump docker/bake-action from 4.3.0 to 4.5.0 (#1390) 2024-05-01 12:25:34 +05:30
.vscode chore: Update recommend extensions 2024-05-17 11:09:02 +02:00
devcontainer-example fix: Update ports 2024-10-07 09:09:00 +02:00
development fix: Development Apps 2024-10-07 08:14:30 +02:00
docs Docs: Add rafnav site install 2024-10-07 08:23:53 +02:00
images fix: Alias syntax on development image build 2025-04-08 14:47:30 +02:00
overrides refactor: prepare for v15 (#1243) 2023-10-20 18:40:10 +05:30
resources fix: sync nginx template from bench changes (#1242) 2023-10-20 16:30:55 +05:30
tests refactor: prepare for v15 (#1243) 2023-10-20 18:40:10 +05:30
.dockerignore Global refactoring (#617) 2022-03-14 11:23:03 +05:30
.editorconfig chore: Use pre-commit framework (#604) 2021-12-10 11:48:00 +03:00
.gitignore ci: Remove apps list from git 2025-03-27 12:12:54 +02:00
.pre-commit-config.yaml chore(deps): Update pre-commit hooks (#1384) 2024-05-01 12:24:38 +05:30
.shellcheckrc chore(lint): Take hooks configs out so linting works without pre-commit too (#609) 2021-12-10 12:31:44 +03:00
CODE_OF_CONDUCT.md chore(lint): Run prettier 2021-12-10 11:53:43 +03:00
compose.yaml fix: Add restart Policies 2025-03-28 08:54:49 +02:00
CONTRIBUTING.md ci: refactor (#1158) 2023-06-26 11:54:37 +05:30
docker-bake.hcl refactor: prepare for v15 (#1243) 2023-10-20 18:40:10 +05:30
example.env Fix: remove erpnext from env example 2025-03-27 12:14:29 +02:00
install_x11_deps.sh Cypress UI Test service and updates to installer.py (#1250) 2023-10-26 08:35:31 +05:30
LICENSE chore: Rename LICENSE.md to LICENSE (#608) 2021-12-10 16:25:57 +05:30
pwd.yml chore: Update example.env 2024-05-13 11:33:31 +00:00
README.md feat: Add common site operations 2025-04-03 10:30:23 +02:00
requirements-test.txt chore(deps): bump pytest from 8.1.1 to 8.2.0 (#1389) 2024-05-01 12:25:05 +05:30
setup.cfg Use pytest (#705) 2022-03-24 10:40:56 +03:00

RAFNAV Docker Setup & Usage

Development

!! You need to be connected to WSL before proceeding

Pre-requisites

To get started, you must have set up an IT Workspace environment.

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 a more 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

We will be attaching a VS Code window to the docker container workspace. This requires the dev containers extension

  1. Open the RAFNAV-Docker folder with Vs Code.
  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...

GitHub Login (GitHub CLI)

  • Make sure you have git and Github CLI installed on windows
  • Log in to GitHub from VsCode to sync your github credentials with GitHub

RAFNAV Installation

Development Branch Apps Install

  frap-install -j apps-development.json -v

Prod Apps Install

 frap-install -j apps-prod.json -v

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

  1. cd into Rafnav's development bench. An alias has already been assigned. Run the following command:
go-rafnav_bench
  1. Now you are able to start development on RAFNAV with all the dependencies and the correct environment set-up.

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

Deployment

Apps List

  1. Specify a list of apps in a JSON file called 'apps.json'
[
  {
    "url": "https://{{PAT}}@github.com/cronos-capital/rafnav_core.git",
    "branch": "main"
  },
  {
    "url": "https://{{PAT}}@github.com/cronos-capital/matter_management.git",
    "branch": "main"
  },
  {
    "url": "https://{{PAT}}@github.com/cronos-capital/raf_finance.git",
    "branch": "main"
  },
  {
    "url": "https://{{PAT}}@github.com/cronos-capital/filing.git",
    "branch": "main"
  },
  {
    "url": "https://{{PAT}}@github.com/cronos-capital/documentation.git",
    "branch": "main"
  }
]

Note: {{PAT}} replace with your personal access token from GitHub

  1. Generate a Base 64 shell variable of the apps list. This will be passed as a build argument for the docker image later
export APPS_JSON_BASE64=$(base64 -w 0 apps.json)

Image Build

Build the production version of the image using

docker build --build-arg=APPS_JSON_BASE64=$APPS_JSON_BASE64 -t rafnav/rafnav_bench:prod --file=images/production/Containerfile .

Publish Image

Publish the newly built docker image to docker hub using your PAT from Docker Hub

  1. Log in to Docker if not already
docker login -u [username]
  1. At the password prompt, paste your PAT
  2. Push the image using the following command:
docker push rafnav/rafnav_bench:prod

Common Operations

New Site

bench new-site [site_name] --mariadb-user-host-login-scope='%' --admin-password [pwd] --verbose

Installing RAFNav

bench --site [site_name] install-app rafnav_core matter_management filing documentation raf_finance

Resources

Production

Development