Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Inconsistent DATABASE_URL Configuration in Docker Setup and .env.example #145

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
### With Docker

1. Clone the repository:

```bash
git clone https://github.com/code100x/muzer.git
```

2. Navigate to the project directory:

```bash
cd muzer
```
Expand All @@ -28,17 +30,19 @@

4. Run the following command to start the application:
```bash
docker compose up -d
docker compose up -d
```

### Without Docker

1. Clone the repository:

```bash
git clone https://github.com/code100x/muzer.git
```

2. Navigate to the project directory:

```bash
cd muzer
```
Expand All @@ -48,23 +52,25 @@
cd next-app
pnpm install
cd ..
cd ws
cd ws
pnpm install
```
4. Create a `.env` file based on the `.env.example` file and configure everything in both the `next-app` and `ws` folders.

5. For postgres, you need to run the following command:

```bash
docker run -d \
--name muzer-db \
-e POSTGRES_USER=myuser \
-e POSTGRES_PASSWORD=mypassword \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=mydatabase \
-p 5432:5432 \
postgres
```

6. For redis, you need to run the following command:

```bash
docker run -d \
--name muzer-redis \
Expand All @@ -73,19 +79,21 @@
-e REDIS_PORT=6379 \
-e REDIS_HOST="127.0.0.1" \
-e REDIS_BROWSER_STACK_PORT=8001 \
redis/redis-stack:latest
redis/redis-stack:latest
```

7. Now do the following:

```bash
cd next-app
pnpm postinstall
cd ..
cd ws
cd ws
pnpm postinstall
```

8. Run the following command to start the application:

```bash
cd next-app
pnpm dev
Expand All @@ -100,7 +108,7 @@
pnpm run prisma:studio
```

## Usage
## Usage

1. Access the application in your browser at http://localhost:3000
2. Access the redis stack at http://localhost:8001/redis-stack/browser
Expand Down
2 changes: 1 addition & 1 deletion next-app/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GOOGLE_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET=YOUR_GOOGLE_CLIENT_SECRET
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=YOUR_NEXTAUTH_SECRET
DATABASE_URL=postgresql://postgres:postgres@postgres:5432/postgres
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres
NEXT_PUBLIC_SECRET=YOUR_NEXTAUTH_SECRET
NEXT_PUBLIC_WSS_URL="ws://localhost:8080"

Expand Down
Loading