Comments (5)
Could you share your entire code? docker-compose.yml and Dockerfile? Did you configure the file watcher?
from frankenphp.
Could you share your entire code? docker-compose.yml and Dockerfile? Did you configure the file watcher?
Here is my dockerfile ,docker-compose and package.json
Docker desktop version
Docker Desktop 4.33.1 (161083)
FROM dunglas/frankenphp:latest AS builder
RUN install-php-extensions \
pdo_mysql \
gd \
intl \
zip \
opcache\
pcntl\
@composer
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g npm@latest \
&& node --version \
&& npm --version
RUN apt-get update && apt-get install -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /app
COPY . /app
RUN npm install
EXPOSE 5173
FROM builder AS development
RUN composer install
ENTRYPOINT ["php", "artisan", "octane:frankenphp"]
docker-compose
php2:
container_name: larabells
build:
context: .
dockerfile: ./docker/web.dockerfile
target: development
image: larabells
ports:
- "80:80"
- "443:443"
- "443:443/udp" # HTTP/3
- "5173:5173"
volumes:
- ./:/app
entrypoint: php artisan octane:frankenphp --watch --host=larabells.local --port=443 --admin-port=2019 --https
environment:
- SERVER_NAME=larabells.local
env_file:
- ./.env
networks:
- mynetwork
I also tried to add a watch as you mentioned above but still not working
here is my pacakte.json
{
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.2",
"alpinejs": "^3.4.2",
"autoprefixer": "^10.4.2",
"axios": "^1.6.4",
"chokidar": "^3.6.0",
"laravel-vite-plugin": "^1.0",
"postcss": "^8.4.31",
"tailwindcss": "^3.1.0",
"vite": "^5.0"
}
}
here is my api.php, I tried in postman but always return hello-1. even I edit it to hello-2.
Route::get('/books', function (Request $request) {
return 'hello-1';
})->middleware('auth:sanctum');
Here is my vite.js
export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js',
],
refresh: true,
}),
],
server: {
hmr: {
host: 'localhost',
},
host: '0.0.0.0',
}
});
Thank you in advance
from frankenphp.
Thank you in advance
Take a look at this how to use octane in dev environment with the max-requests flag
from frankenphp.
Have you tried installing chokidar globally in your Dockerfile? This works form me:
...
RUN npm i chokidar -g
ENTRYPOINT ["php", "artisan", "octane:frankenphp", "--watch"]
from frankenphp.
I reinstalled the vendor and node_modules and added the --watch flag, and the API is working i can see now the updated response
Thank you for helping me
from frankenphp.
Related Issues (20)
- [QUESTION] Is frankenphp can be use to pipelines ? HOT 6
- Missing space on webpage HOT 2
- Intermittent File Write Failures with fwrite HOT 3
- Invalid post type. error when I click on "POSTS" in teh Wordpress admin menu HOT 12
- Why do I constantly getting slower results with FrankenPHP vs php:8.3-fpm HOT 15
- Cannot rebuild static binary HOT 11
- ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF HOT 2
- Inconsistency in environment variables HOT 5
- Strange issues with file-descriptors HOT 2
- worker is not restarting when using xdebug on symfony project HOT 6
- Can't run Caddy with HTTP cache HOT 10
- thrown in /app/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php HOT 2
- "No Active Transaction" Error After Reconnecting Database in Worker Mode HOT 1
- Question: how to build a standalone frankenphp binary with Caddy cache-handler HOT 3
- curl.cainfo setting from php.ini is being ignored and thus certs aren't available to cURL HOT 20
- Allow a way to define scripts to be run regularly or as a service HOT 2
- Question: about task scheduling in laravel HOT 1
- Deploying on render.com
- XDebug toggling optimizations HOT 4
- Error after build process HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frankenphp.