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
The Docker environment script will create or overwrite all environment files:
373
+
374
+
```bash
375
+
# For HTTP/WS
376
+
./update-docker-env.sh your-hostname
377
+
378
+
# For HTTPS/WSS
379
+
./update-docker-env.sh your-hostname true
363
380
```
364
-
STORAGE_PROVIDER=s3
365
-
AWS_REGION=us-east-1
366
-
AWS_BUCKET=worklenz-bucket
367
-
S3_ACCESS_KEY_ID=minioadmin
368
-
S3_SECRET_ACCESS_KEY=minioadmin
369
-
S3_URL=http://minio:9000
370
-
```
371
381
372
-
When the backend service starts, it will use these environment variables to connect to MinIO for file storage.
382
+
This script generates properly configured environment files for both development and production environments.
383
+
384
+
## Docker Deployment
373
385
374
-
## Development
386
+
### Local Development with Docker
387
+
388
+
1. Set up the environment files:
389
+
```bash
390
+
# For HTTP/WS
391
+
./update-docker-env.sh
392
+
393
+
# For HTTPS/WSS
394
+
./update-docker-env.sh localhost true
395
+
```
396
+
397
+
2. Run the application using Docker Compose:
398
+
```bash
399
+
docker-compose up -d
400
+
```
375
401
376
-
For development, you can use the provided Docker setup which includes all necessary dependencies. The code will be running inside containers, but you can still edit files locally and see changes reflected in real-time.
402
+
3. Access the application:
403
+
- Frontend: http://localhost:5000
404
+
- Backend API: http://localhost:3000 (or https://localhost:3000 with SSL)
405
+
406
+
### Remote Server Deployment
407
+
408
+
When deploying to a remote server:
409
+
410
+
1. Set up the environment files with your server's hostname:
411
+
```bash
412
+
# For HTTP/WS
413
+
./update-docker-env.sh your-server-hostname
414
+
415
+
# For HTTPS/WSS
416
+
./update-docker-env.sh your-server-hostname true
417
+
```
418
+
419
+
This ensures that the frontend correctly connects to the backend API.
420
+
421
+
2. Pull and run the latest Docker images:
422
+
```bash
423
+
docker-compose pull
424
+
docker-compose up -d
425
+
```
426
+
427
+
3. Access the application through your server's hostname:
428
+
- Frontend: http://your-server-hostname:5000
429
+
- Backend API: http://your-server-hostname:3000
430
+
431
+
### Environment Configuration
377
432
378
-
## Production Deployment
433
+
The Docker setup uses environment variables to configure the services:
379
434
380
-
For production deployment:
435
+
- Frontend:
436
+
-`VITE_API_URL`: URL of the backend API (default: http://backend:3000 for container networking)
437
+
-`VITE_SOCKET_URL`: WebSocket URL for real-time communication (default: ws://backend:3000)
381
438
382
-
1. Update the `.env` file with production settings
383
-
2. Build custom Docker images or use the provided ones
384
-
3. Deploy using Docker Compose or a container orchestration platform like Kubernetes
439
+
- Backend:
440
+
- Database connection parameters
441
+
- Storage configuration
442
+
- Other backend settings
385
443
386
-
For MinIO in production, consider:
387
-
- Setting up proper credentials (change default minioadmin/minioadmin)
388
-
- Configuring persistent storage
389
-
- Setting up proper networking and access controls
390
-
- Using multiple MinIO instances for high availability
444
+
For custom configuration, edit the `.env` file or the `update-docker-env.sh` script.
0 commit comments