Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 66 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down