fix dev environment

This commit is contained in:
myrmidex 2025-12-29 19:47:58 +01:00
parent 4ea9f748f8
commit b5669277ed
7 changed files with 37 additions and 22 deletions

View file

@ -1,5 +1,5 @@
# Production Dockerfile with FrankenPHP # Production Dockerfile with FrankenPHP
FROM dunglas/frankenphp:latest-php8.4-alpine FROM dunglas/frankenphp:latest-php8.3-alpine
# Install system dependencies # Install system dependencies
RUN apk add --no-cache \ RUN apk add --no-cache \

View file

@ -1,5 +1,5 @@
# Development Dockerfile with FrankenPHP # Development Dockerfile with FrankenPHP
FROM dunglas/frankenphp:latest-php8.4-alpine FROM dunglas/frankenphp:latest-php8.3-alpine
# Install system dependencies + development tools # Install system dependencies + development tools
RUN apk add --no-cache \ RUN apk add --no-cache \

View file

@ -5,7 +5,7 @@ services:
container_name: buckets_app container_name: buckets_app
restart: always restart: always
ports: ports:
- "8000:8000" - "8100:8000"
environment: environment:
# Required from user # Required from user
APP_KEY: "${APP_KEY}" # Critical - must persist across deployments APP_KEY: "${APP_KEY}" # Critical - must persist across deployments

View file

@ -11,15 +11,15 @@ services:
# Remove user directive to run as root in container # Remove user directive to run as root in container
# The container will handle permissions internally # The container will handle permissions internally
ports: ports:
- "8000:8000" # Laravel app - "8100:8000" # Laravel app
- "5173:5173" # Vite dev server - "5174:5173" # Vite dev server
environment: environment:
# Laravel # Laravel
APP_NAME: "${APP_NAME:-buckets}" APP_NAME: "${APP_NAME:-buckets}"
APP_ENV: "${APP_ENV:-local}" APP_ENV: "${APP_ENV:-local}"
APP_KEY: "${APP_KEY:-base64:YOUR_KEY_HERE}" APP_KEY: "${APP_KEY:-base64:YOUR_KEY_HERE}"
APP_DEBUG: "${APP_DEBUG:-true}" APP_DEBUG: "${APP_DEBUG:-true}"
APP_URL: "${APP_URL:-http://localhost:8000}" APP_URL: "${APP_URL:-http://localhost:8100}"
# Database # Database
DB_CONNECTION: mysql DB_CONNECTION: mysql
@ -39,6 +39,7 @@ services:
# Vite # Vite
VITE_HOST: "0.0.0.0" VITE_HOST: "0.0.0.0"
VITE_PORT: "5174"
volumes: volumes:
# Mount entire project for hot reload with SELinux context # Mount entire project for hot reload with SELinux context
- .:/app:Z - .:/app:Z
@ -55,7 +56,7 @@ services:
container_name: buckets_db container_name: buckets_db
restart: unless-stopped restart: unless-stopped
ports: ports:
- "3306:3306" - "3307:3306"
environment: environment:
MYSQL_DATABASE: "${DB_DATABASE:-buckets}" MYSQL_DATABASE: "${DB_DATABASE:-buckets}"
MYSQL_USER: "${DB_USERNAME:-buckets}" MYSQL_USER: "${DB_USERNAME:-buckets}"
@ -79,8 +80,8 @@ services:
container_name: buckets_mailhog container_name: buckets_mailhog
restart: unless-stopped restart: unless-stopped
ports: ports:
- "1025:1025" # SMTP server - "1026:1025" # SMTP server
- "8025:8025" # Web UI - "8026:8025" # Web UI
networks: networks:
- buckets - buckets
@ -90,8 +91,8 @@ services:
container_name: buckets_selenium container_name: buckets_selenium
restart: unless-stopped restart: unless-stopped
ports: ports:
- "4444:4444" # Selenium server - "4445:4444" # Selenium server
- "7900:7900" # VNC server for debugging - "7901:7900" # VNC server for debugging
volumes: volumes:
- /dev/shm:/dev/shm - /dev/shm:/dev/shm
networks: networks:

2
package-lock.json generated
View file

@ -1,5 +1,5 @@
{ {
"name": "buckets", "name": "app",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {

View file

@ -50,6 +50,12 @@ pkgs.mkShell {
echo "🚀 Starting development environment..." echo "🚀 Starting development environment..."
PODMAN_USERNS=keep-id podman-compose up -d PODMAN_USERNS=keep-id podman-compose up -d
echo " Dev environment started!" echo " Dev environment started!"
echo ""
echo "📍 Services available at:"
echo " App: http://localhost:8100"
echo " Vite: http://localhost:5174"
echo " Mailhog: http://localhost:8026"
echo " MariaDB: localhost:3307"
} }
dev-down() { dev-down() {
@ -160,10 +166,10 @@ pkgs.mkShell {
echo "" echo ""
echo " Services should be available at:" echo " Services should be available at:"
echo " App: http://localhost:8000" echo " App: http://localhost:8100"
echo " Vite: http://localhost:5173" echo " Vite: http://localhost:5174"
echo " Mailhog: http://localhost:8025" echo " Mailhog: http://localhost:8026"
echo " MariaDB: localhost:3306" echo " MariaDB: localhost:3307"
echo "" echo ""
echo "Run 'podman-compose logs -f app' to follow logs" echo "Run 'podman-compose logs -f app' to follow logs"
fi fi

View file

@ -24,4 +24,12 @@ export default defineConfig({
esbuild: { esbuild: {
jsx: 'automatic', jsx: 'automatic',
}, },
server: {
host: '0.0.0.0',
port: 5173,
strictPort: true,
hmr: {
clientPort: 5174,
},
},
}); });