Skip to content

Commit 5895eda

Browse files
committed
Update development readme
1 parent 01a7b02 commit 5895eda

File tree

1 file changed

+85
-14
lines changed

1 file changed

+85
-14
lines changed

docker/development/README.md

Lines changed: 85 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
1-
Here’s a cleaner and more polished version of your Hi.Events local development guide:
2-
3-
---
4-
51
# Hi.Events local development with Docker
62

7-
This guide walks you through setting up Hi.Events using Docker, including requirements, setup steps, configuration, and
8-
environment variables.
3+
This guide walks you through setting up Hi.Events using Docker, including requirements, setup steps, configuration,
4+
and environment variables.
95

106
## Requirements
117

128
1. **Docker** – Required for containerized development. [Install Docker](https://docs.docker.com/get-docker/)
13-
2. **Git** – Needed to clone the
14-
repository. [Install Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
9+
2. **Git** – Needed to clone the repository. [Install Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
1510

16-
> **Note:** This guide assumes a macOS or Linux environment. Windows users may need to adjust certain commands.
11+
> **Note:** This guide assumes a macOS or Linux environment by default. See the **Windows setup instructions** below if you're on Windows.
1712
18-
## Setup instructions
13+
---
1914

20-
### 1. Clone the repository
15+
## Setup instructions (macOS / Linux)
2116

22-
Clone the Hi.Events GitHub repository:
17+
### 1. Clone the repository
2318

2419
```bash
2520
git clone [email protected]:HiEventsDev/Hi.Events.git
@@ -38,6 +33,83 @@ Once running, access the app at:
3833

3934
- **Frontend**: [https://localhost:8443](https://localhost:8443)
4035

36+
---
37+
38+
## Setup instructions (Windows)
39+
40+
Windows users should follow the steps below to manually run the setup commands instead of using the `start-dev.sh` script.
41+
42+
### 1. Clone the repository
43+
44+
Using Git Bash or Windows Terminal:
45+
46+
```bash
47+
git clone [email protected]:HiEventsDev/Hi.Events.git
48+
cd Hi.Events/docker/development
49+
```
50+
51+
### 2. Generate SSL certificates
52+
53+
You can use `openssl` to generate self-signed certificates:
54+
55+
```bash
56+
mkdir -p certs
57+
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout certs/localhost.pem.key -out certs/localhost.pem -subj "/CN=localhost"
58+
```
59+
60+
Then, update your `docker/development/nginx/nginx.conf` to use `.pem` files:
61+
62+
```nginx
63+
ssl_certificate /etc/nginx/certs/localhost.pem;
64+
ssl_certificate_key /etc/nginx/certs/localhost.pem.key;
65+
```
66+
67+
> If you're using `.crt`/`.key`, update accordingly.
68+
69+
### 3. Start Docker services
70+
71+
```bash
72+
docker-compose -f docker-compose.dev.yml up -d
73+
```
74+
75+
### 4. Install backend dependencies
76+
77+
```bash
78+
docker-compose -f docker-compose.dev.yml exec -T backend composer install --ignore-platform-reqs --no-interaction --optimize-autoloader --prefer-dist
79+
```
80+
81+
### 5. Wait for the database
82+
83+
Keep checking logs until you see "ready to accept connections":
84+
85+
```bash
86+
docker-compose -f docker-compose.dev.yml logs pgsql
87+
```
88+
89+
### 6. Create environment files (if missing)
90+
91+
```bash
92+
docker-compose -f docker-compose.dev.yml exec backend cp .env.example .env
93+
docker-compose -f docker-compose.dev.yml exec frontend cp .env.example .env
94+
```
95+
96+
### 7. Laravel setup
97+
98+
```bash
99+
docker-compose -f docker-compose.dev.yml exec backend php artisan key:generate
100+
docker-compose -f docker-compose.dev.yml exec backend php artisan migrate
101+
docker-compose -f docker-compose.dev.yml exec backend chmod -R 775 /var/www/html/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer
102+
docker-compose -f docker-compose.dev.yml exec backend php artisan storage:link
103+
```
104+
105+
### 8. Open the app
106+
107+
```bash
108+
start https://localhost:8443/auth/register
109+
```
110+
111+
---
112+
41113
## Additional configuration
42114

43115
Hi.Events uses environment variables for configuration. You’ll find `.env` files in:
@@ -47,5 +119,4 @@ Hi.Events uses environment variables for configuration. You’ll find `.env` fil
47119

48120
You can modify these to customize your setup.
49121

50-
For a full list of environment variables, see
51-
the [Environment Variables Documentation](https://hi.events/docs/getting-started/deploying#environment-variables).
122+
For a full list of environment variables, see the [Environment Variables Documentation](https://hi.events/docs/getting-started/deploying#environment-variables).

0 commit comments

Comments
 (0)