Hello!
The files used to create the base Docker image are here: GitHub - fly-apps/laravel-docker: Base Docker images for use with Laravel on Fly.io
For your case, I would
- Copy this Nginx config file: https://github.com/fly-apps/laravel-docker/blob/main/src/nginx/sites-available/default
- Save it to the
.flydirectory in your code, generated byfly launch(e.g..fly/default) - Adjust the downloaded file to add your cache header (perhaps on static assets only?)
- Add a line to your
Dockerfileto copy your new config file and replace the default one:
RUN cp .fly/default /etc/nginx/sites-available/default
Add that near line 86 or so of the Dockerfile.
I’m assuming you’re not using Octane. There’s a separate file
default-octaneto edit/copy if you’re using Octane.