You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DB_ENCRYPTION_KEY=YOUR_ENCRYPTION_KEY_HERE# Must be 128 Characters Long
9
-
REDIS_URL=redis://
8
+
DB_ENCRYPTION_KEY=YOUR_ENCRYPTION_KEY_HERE# Must be 128 Characters Long - use this in terminal: node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"
9
+
REDIS_URL=redis://localhost:6379
10
10
11
11
DISCORD_CLIENT_ID=YOUR_CLIENT_ID_HERE# Get it from https://discord.com/developers/applications
12
12
DISCORD_CLIENT_SECRET=YOUR_CLIENT_SECRET_HERE# Get it from https://discord.com/developers/applications
Copy file name to clipboardExpand all lines: README.md
+41-12Lines changed: 41 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,27 +13,56 @@ If you just want to try or demo PFControl:
13
13
14
14
## Development — Local setup
15
15
16
-
The following steps get the project running on your machine for development and testing.
16
+
Getting started with PFControl development is straightforward. We've set up Docker Compose to handle PostgreSQL and Redis for you, so you don't need to manually configure databases.
17
17
18
-
1. Install dependencies
18
+
### Setup instructions
19
19
20
-
```
21
-
npm install
22
-
```
20
+
1.**Install Docker Desktop** (if you don't have it)
21
+
Download from [docker.com](https://www.docker.com/products/docker-desktop) and open it. Make sure it fully starts up.
23
22
24
-
2. Create an environment file
25
-
Copy the example and update environment variables into `.env.development`.
> **Note:** For full functionality, you must set up PostgreSQL and Redis and provide the correct connection URLs in your `.env.development` file.
28
-
> If you are unable to set up these services locally, you can still run the frontend, but backend features will be limited or unavailable.
29
-
> If you need help or require development environment variables, join our [Discord server](https://pfconnect.online/discord), create a ticket, and ask for assistance.
29
+
3.**Start PostgreSQL and Redis**
30
+
```bash
31
+
docker-compose -f docker-compose.dev.yml up -d
32
+
```
33
+
This starts local PostgreSQL and Redis containers in the background. First-time setup downloads the images and takes about 30 seconds.
30
34
31
-
3. Start the development environment
35
+
4.**Set up your environment file**
36
+
```bash
37
+
cp .env.example .env.development
32
38
```
39
+
This creates a `.env.development` file with localhost connection strings that point to the Docker containers.
40
+
41
+
5.**Install dependencies and start the dev server**
42
+
```bash
43
+
npm install
33
44
npm run dev
34
45
```
35
46
36
-
Frontend will be available at http://localhost:5173 and Backend API at http://localhost:9901 by default.
47
+
That's it! The frontend will be at [http://localhost:5173](http://localhost:5173) and the backend API at [http://localhost:9901](http://localhost:9901).
48
+
49
+
**When you're done**, stop the databases with:
50
+
```bash
51
+
docker-compose -f docker-compose.dev.yml down
52
+
```
53
+
54
+
To reset your local database (fresh start), run:
55
+
```bash
56
+
docker-compose -f docker-compose.dev.yml down -v
57
+
docker-compose -f docker-compose.dev.yml up -d
58
+
```
59
+
60
+
### Troubleshooting
61
+
62
+
-**"Cannot connect to the Docker daemon"**: Make sure Docker Desktop is running. Open the Docker Desktop application before running docker-compose commands
63
+
-**"Cannot connect to PostgreSQL"**: Make sure Docker Compose is running (`docker ps` should show postgres and redis containers)
64
+
-**"Port 5432 already in use"**: You might have PostgreSQL installed locally. Either stop your local PostgreSQL or change the port mapping in `docker-compose.dev.yml`
65
+
-**Need help?** Join our [Discord server](https://pfconnect.online/discord), create a ticket, and we'll help you out
0 commit comments