diff --git a/README.md b/README.md index 733009d..81500f1 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,72 @@ -## Getting Started +## CAPN Nepal Website -First, run the development server: +### Local development (with docker) +**Clone** + +Clone the repository using HTTPS, SSH, or Github CLI + +```bash +git clone https://github.com/capn-nepal/website.git #HTTPS +git clone git@github.com:capn-nepal/website.git #SSH +gh repo clone capn-nepal/website #Github CLI +``` +Download the contents of backend(website-backend) +```bash +git submodule update --init --recursive +``` +Create Environment variables +> NOTE: create `.env` file for backend +```bash +cd backend +``` +```bash +touch .env +``` + Example `.env` file + ``` + SECRET_KEY + TC_CMS_ADDITIONAL_TRUSTED_ORIGINS= + DJANGO_SECRET_KEY= + ... + ``` + +* create .env file for the CAPN-website +```bash +touch .env +``` + + Example `.env` file + ``` + PORT= + APP_GRAPHQL_ENDPOINT= + COMPOSE_FILE= + ... + ``` + +**Build and pull images** +```bash +docker compose pull +docker compose build +``` +### Run + +**Essentials** +```bash +docker compose up +``` +Install the dependencies +```bash +docker compose exec next bash -c 'pnpm install' +``` +Pre-build +```bash +docker compose exec next bash -c 'pnpm prebuild' +``` + +Generate type ```bash -pnpm run dev +docker compose exec next bash -c 'pnpm generate:type' ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.