Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

Remove hard coded development keys

Dave Earley0f3e052b283d
diff --git a/README.md b/README.md
index ddc1d2738..586c8106e 100644
--- a/README.md
+++ b/README.md
@@ -110,11 +110,26 @@ a quick start, follow these steps:
cd hi.events/docker/all-in-one
```
-3. **Start the Docker Containers:**
+3. **Generate the `APP_KEY` and `JWT_SECRET`**
+
+ Generate the keys using the following commands:
+
+ **Unix/Linux/MacOS:**
+ ```bash
+ echo base64:$(openssl rand -base64 32) # For APP_KEY
+ openssl rand -base64 32 # For JWT_SECRET
+ ```
+
+ **Windows:**
+ Check the instructions in *./docker/all-in-one/README.md* for generating the keys on Windows.
+
+ Add the generated values to the `.env` file located in `./docker/all-in-one/.env`:
+
+4. **Start the Docker Containers:**
```bash
docker compose up -d
```
-4. **Create an account:**
+5. **Create an account:**
```bash
Open your browser and navigate to http://localhost:8123/auth/register.
```
diff --git a/docker/all-in-one/.env b/docker/all-in-one/.env
new file mode 100644
index 000000000..1a6c74a39
--- /dev/null
+++ b/docker/all-in-one/.env
@@ -0,0 +1,2 @@
+APP_KEY=
+JWT_SECRET=
diff --git a/docker/all-in-one/README.md b/docker/all-in-one/README.md
index 9c0293659..08cff3e19 100644
--- a/docker/all-in-one/README.md
+++ b/docker/all-in-one/README.md
@@ -1,6 +1,58 @@
-# Hi.Events all-in-one Docker image
+# Hi.Events All-in-One Docker Image
-The all-on-one Docker image is a single container that runs both the frontend and backend services of Hi.Events.
+The all-in-one Docker image runs both the frontend and backend services in a single container. While it can be used in production, the recommended approach for production is to run the frontend and backend separately for better scalability and security.
-While it can be used in production, the recommended way to run Hi.Events in production is to run the frontend and backend
-services separately.
\ No newline at end of file
+## Quick Start with Docker
+
+### Step 1: Clone the Repository
+
+```bash
+git clone [email protected]:HiEventsDev/hi.events.git
+cd hi.events/docker/all-in-one
+```
+
+### Step 2: Generate the `APP_KEY` and `JWT_SECRET`
+
+Generate the keys using the following commands:
+
+#### Unix/Linux/MacOS/WSL
+```bash
+echo base64:$(openssl rand -base64 32) # For APP_KEY
+openssl rand -base64 32 # For JWT_SECRET
+```
+
+#### Windows (Command Prompt):
+```cmd
+for /f "tokens=*" %i in ('openssl rand -base64 32') do @echo APP_KEY=base64:%i
+for /f "tokens=*" %i in ('openssl rand -base64 32') do @echo JWT_SECRET=%i
+```
+
+#### Windows (PowerShell):
+```powershell
+"base64:$([Convert]::ToBase64String([System.Security.Cryptography.RandomNumberGenerator]::GetBytes(32)))" # For APP_KEY
+[Convert]::ToBase64String([System.Security.Cryptography.RandomNumberGenerator]::GetBytes(32)) # For JWT_SECRET
+```
+
+### Step 3: Update the `.env` File
+
+Update the `.env` file located in `./docker/all-in-one/.env` with the generated `APP_KEY` and `JWT_SECRET`:
+
+```plaintext
+APP_KEY=your_generated_app_key
+JWT_SECRET=your_generated_jwt_secret
+```
+
+### Step 4: Start the Docker Containers
+
+```bash
+docker-compose up -d
+```
+
+### Step 5: Create an Account
+
+Visit [http://localhost:8123/auth/register](http://localhost:8123/auth/register) to create an account.
+
+---
+
+**Production Note:**
+For production, ensure you generate unique `APP_KEY` and `JWT_SECRET` for each environment and never hardcode sensitive values.
diff --git a/docker/all-in-one/docker-compose.yml b/docker/all-in-one/docker-compose.yml
index a2ffdae90..a33660b28 100644
--- a/docker/all-in-one/docker-compose.yml
+++ b/docker/all-in-one/docker-compose.yml
@@ -14,8 +14,8 @@ services:
- LOG_CHANNEL=stderr
- QUEUE_CONNECTION=sync
- MAIL_MAILER=array
- - APP_KEY=base64:ZIkx+O/ILP80gxHRLH+Yv7qKv94oHUgFdPn4OdD/hO8=
- - JWT_SECRET=TJMzToO9cKLFpF5v4ADvNbTnvuWfgYNj
+ - APP_KEY=${APP_KEY}
+ - JWT_SECRET=${JWT_SECRET}
- FILESYSTEM_PUBLIC_DISK=public
- FILESYSTEM_PRIVATE_DISK=local
- APP_CDN_URL=http://localhost:8123/storage