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
FROM dunglas/frankenphp:latest-php8.4-alpine
FROM dunglas/frankenphp:latest-php8.3-alpine
# Install system dependencies
RUN apk add --no-cache \

View file

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

View file

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

2
package-lock.json generated
View file

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

View file

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

View file

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