Merge pull request #32 from anagobabatunde/main
docs: expand setup instructions with prerequisites and database setup steps
This commit is contained in:
87
README.md
87
README.md
@ -26,48 +26,69 @@ A free, open-source video editor for web, desktop, and mobile.
|
|||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
1. **Clone the repository:**
|
### Prerequisites
|
||||||
|
|
||||||
```bash
|
Before you begin, ensure you have the following installed on your system:
|
||||||
git clone <repo-url>
|
|
||||||
cd OpenCut
|
|
||||||
```
|
|
||||||
2. **Install dependencies:**
|
|
||||||
|
|
||||||
```bash
|
- [Bun](https://bun.sh/docs/installation)
|
||||||
cd apps/web
|
- [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/)
|
||||||
npm install
|
- [Node.js](https://nodejs.org/en/) (for `npm` alternative)
|
||||||
# or, with Bun
|
|
||||||
bun install
|
|
||||||
```
|
|
||||||
3. **Run the development server:**
|
|
||||||
|
|
||||||
```bash
|
### Setup
|
||||||
npm run dev
|
|
||||||
# or, with Bun
|
|
||||||
bun run dev
|
|
||||||
```
|
|
||||||
4. **Open in browser:**
|
|
||||||
|
|
||||||
Visit [http://localhost:3000](http://localhost:3000)
|
1. **Clone the repository**
|
||||||
|
```bash
|
||||||
|
git clone <repo-url>
|
||||||
|
cd OpenCut
|
||||||
|
```
|
||||||
|
|
||||||
## Run with Docker
|
2. **Start backend services**
|
||||||
1. **Prepare environment variables:**
|
From the project root, start the PostgreSQL and Redis services:
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
Edit [docker-compose.yaml](https://github.com/OpenCut-app/OpenCut/blob/main/docker-compose.yaml#L57-L64)
|
3. **Set up environment variables**
|
||||||
2. **Build and run:**
|
Navigate into the web app's directory and create a `.env` file from the example:
|
||||||
|
```bash
|
||||||
|
cd apps/web
|
||||||
|
cp .env.example .env
|
||||||
|
```
|
||||||
|
*The default values in the `.env` file should work for local development.*
|
||||||
|
|
||||||
```bash
|
4. **Install dependencies**
|
||||||
docker-compose up -d --build
|
Install the project dependencies using `bun` (recommended) or `npm`.
|
||||||
```
|
```bash
|
||||||
3. *(Optional)* **Migrate database:**
|
# With bun
|
||||||
|
bun install
|
||||||
|
|
||||||
```bash
|
# Or with npm
|
||||||
docker-compose exec web bun run db:migrate
|
npm install
|
||||||
```
|
```
|
||||||
4. **Open in browser:**
|
|
||||||
|
5. **Run database migrations**
|
||||||
|
Apply the database schema to your local database:
|
||||||
|
```bash
|
||||||
|
# With bun
|
||||||
|
bun run db:push:local
|
||||||
|
|
||||||
|
# Or with npm
|
||||||
|
npm run db:push:local
|
||||||
|
```
|
||||||
|
|
||||||
|
6. **Start the development server**
|
||||||
|
```bash
|
||||||
|
# With bun
|
||||||
|
bun run dev
|
||||||
|
|
||||||
|
# Or with npm
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
The application will be available at [http://localhost:3000](http://localhost:3000).
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
Visit [http://localhost:3000](http://localhost:3000)
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user