- Change frontend port from 80 to 8847 and backend port from 3001 to 9173 in .env.example - Replace nginx stage in frontend Dockerfile with node alpine and serve for static hosting - Remove nginx.conf and related configuration for frontend static serving - Update docker-compose ports and healthcheck URLs to match new port assignments - Adjust server Dockerfile to expose new backend port 9173 and update healthcheck URL - Create non-root user in frontend Dockerfile and run serve command on port 8847 - Update healthcheck commands to use wget on new ports for both frontend and backend
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
frontend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
- VITE_MS_CLIENT_ID=${VITE_MS_CLIENT_ID}
|
|
- VITE_GOOGLE_CLIENT_ID=${VITE_GOOGLE_CLIENT_ID}
|
|
- VITE_API_URL=${VITE_API_URL:-}
|
|
ports:
|
|
- "${FRONTEND_PORT:-8847}:8847"
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: [ "CMD", "wget", "-q", "--spider", "http://localhost:8847" ]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
labels:
|
|
- "coolify.managed=true"
|
|
|
|
backend:
|
|
build:
|
|
context: ./server
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "${BACKEND_PORT:-9173}:9173"
|
|
environment:
|
|
- PORT=9173
|
|
- NODE_ENV=${NODE_ENV:-production}
|
|
- VITE_MS_CLIENT_ID=${VITE_MS_CLIENT_ID}
|
|
- MS_CLIENT_SECRET=${MS_CLIENT_SECRET}
|
|
- VITE_GOOGLE_CLIENT_ID=${VITE_GOOGLE_CLIENT_ID}
|
|
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
|
|
- REDIRECT_URI=${REDIRECT_URI}
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: [ "CMD", "wget", "-q", "--spider", "http://localhost:9173/health" ]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 15s
|
|
labels:
|
|
- "coolify.managed=true"
|
|
|
|
networks:
|
|
default:
|
|
name: cloudstream-network
|