Skip to content

Commit

Permalink
Merge pull request #15 from robsonvnt/patch-1
Browse files Browse the repository at this point in the history
Update Development Documentation
  • Loading branch information
meltyshev authored Apr 15, 2024
2 parents 2a63e5e + 54ced98 commit 593a904
Showing 1 changed file with 53 additions and 15 deletions.
68 changes: 53 additions & 15 deletions docs/Development.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,71 @@
---
sidebar_position: 98
---
# Development
Clone the repository and install dependencies:
# Development Setup for Planka

```
git clone https://github.com/plankanban/planka.git
## Cloning the Repository

To get started, clone the Planka repository and install the required dependencies:

```bash
git clone https://github.com/plankanban/planka.git
cd planka
npm install
```

Either use a local database or start the provided development database:
## Traditional Development Setup

```
### Setting Up the Database

You can either use a local database or start the provided development database with Docker:

```bash
docker-compose -f docker-compose-db.yml up
```

Create `server/.env` based on `server/.env.sample` and edit `DATABASE_URL` if needed.\
Uncomment and edit `DEFAULT_ADMIN_*` variables if you need an initial administrator account.
### Configure Environment Variables

Then initialize the database:
Create `server/.env` based on `server/.env.sample` and edit the `DATABASE_URL` to point to your database. Uncomment and configure the `DEFAULT_ADMIN_*` variables if you need an initial administrator account.

```
### Initialize the Database

Run the following command to initialize your database:

```bash
npm run server:db:init
```

Start the development server:
### Start the Development Server

```
Start your development server:

```bash
npm start
```

## Docker-Based Development Setup

To simplify the setup and streamline development, you can use the Docker environment that orchestrates all necessary services and dependencies. This setup ensures that the code is updated automatically within the container for rapid feedback on changes.

### Start the Complete Development Environment

Start the complete development environment with:

```bash
docker-compose -f docker-compose-dev.yml up
```

This command will build and start all required services, including the server, client, database, and proxy.

### Environment Variables

Ensure the following environment variables are set in your Docker configuration:

- `NODE_ENV=development` for all services to run in the development mode.
- `[email protected]` - Email address for the admin account.
- `DEFAULT_ADMIN_PASSWORD=demo` - Password for the admin account.
- `DEFAULT_ADMIN_NAME=Demo Demo` - Full name of the admin.
- `DEFAULT_ADMIN_USERNAME=demo` - Username for the admin login.

### Accessing the Application

Once the Docker containers are up and running, the client can be accessed at `http://localhost:3000`, and the API server will also be available at this URL.

Make sure the ports in the Docker configurations do not conflict with any other services on your machine. Adjust the `docker-compose-dev.yml` as needed.

0 comments on commit 593a904

Please sign in to comment.