Update frontend ports to 38080 and 30443 to avoid conflicts with other containers

- Changed frontend HTTP port from 80 to 38080
- Changed frontend HTTPS port from 443 to 30443
- Updated deploy.sh to generate docker-compose with new ports
- Updated QUICK_FIX.md with port configuration details
- Updated QUICK_DEPLOY.md with port information and verification steps
This commit is contained in:
2026-01-15 10:04:07 +01:00
parent c4f599835a
commit 2c641296d2
3 changed files with 49 additions and 12 deletions

View File

@@ -200,6 +200,19 @@ sleep 15
docker-compose ps
```
**Note on Ports:**
The frontend runs on:
- Port `38080` (HTTP) - Change this if your server uses different ports
- Port `30443` (HTTPS) - For SSL when configured
Edit docker-compose.yml if you need different ports:
```yaml
frontend:
ports:
- '38080:80' # HOST_PORT:CONTAINER_PORT
- '30443:443'
```
**Verify Services:**
```bash
# Backend health
@@ -267,8 +280,8 @@ crontab -e
**Test the Application:**
```bash
# From your browser
https://yourdomain.com
# From your browser (note: using port 38080)
http://your-server-ip:38080
# You should see:
1. Login page loads
@@ -281,8 +294,9 @@ https://yourdomain.com
**Quick Health Check:**
```bash
curl -s https://yourdomain.com/api/health | jq .
curl http://localhost:38080/ | head -20
curl http://localhost:3000/api/health | jq .
# Should return: { "status": "ok", ... }
```

View File

@@ -72,7 +72,26 @@ server {
}
```
## Step 3: Update docker-compose.yml
## Step 3: Update docker-compose.yml - Frontend Ports
If other containers are using ports 80 and 443, update the frontend service to use alternate ports:
```yaml
frontend:
image: ghcr.io/zlorfi/edh-stats-frontend:v1.0.5
ports:
- '38080:80' # Changed from 80:80
- '30443:443' # Changed from 443:443
restart: unless-stopped
networks:
- edh-stats-network
```
Then access the app at:
- HTTP: `http://your-server:38080`
- HTTPS: `https://your-server:30443` (when SSL configured)
## Step 4: Update docker-compose.yml - Init Service
Update the `init-db` service to use more permissive permissions:
@@ -93,7 +112,7 @@ Key changes:
- Added `touch /app/database/data/.initialized` to create a test file
- Added `restart: "no"` so the init service doesn't restart
## Step 4: Clear Existing Volumes (Fresh Start)
## Step 5: Clear Existing Volumes (Fresh Start)
⚠️ **WARNING: This will DELETE your database if you have data!**
@@ -103,13 +122,13 @@ If you want to start fresh:
docker volume rm edh-stats_sqlite_data edh-stats_app_logs 2>/dev/null || true
```
## Step 5: Start Services
## Step 6: Start Services
```bash
docker-compose up -d
```
## Step 6: Monitor Startup
## Step 7: Monitor Startup
```bash
# Watch the init-db service create directories
@@ -140,15 +159,19 @@ frontend-1 | ... ready for start up
## Verify Everything Works
```bash
# Check API is responding
# Check API is responding (backend runs on port 3000 internally)
curl http://localhost:3000/api/health
# Check frontend is responding
curl http://localhost/
# Check frontend is responding (now on port 38080)
curl http://localhost:38080/
# All containers running?
docker-compose ps
# Should show: backend (running), frontend (running), init-db (exited)
# Access the app in your browser
# HTTP: http://your-server-ip:38080
# HTTPS: https://your-server-ip:30443 (when SSL is configured)
```
## What Changed and Why

View File

@@ -321,8 +321,8 @@ services:
frontend:
image: ${FRONTEND_IMAGE}
ports:
- '80:80'
- '443:443'
- '38080:80'
- '30443:443'
restart: unless-stopped
networks:
- edh-stats-network