Giter Site home page Giter Site logo

laravel-docker's Introduction

Laravel Docker

This repository creates base Docker images for use with Laravel on Fly.io.

PHP

This creates a base container for the following PHP versions

  • 7.4
  • 8.0
  • 8.1
  • 8.2
  • 8.3

Built containers from this project will be available at https://hub.docker.com/r/fideloper/fly-laravel

Building

You can build containers from this project using a command like so:

# From the project root:
PHP_VERSION="8.2"
docker build \
    -t myimage:$PHP_VERSION
    --build-arg PHP_VERSION=$PHP_VERSION \
    -f src/Dockerfile \
    ./src

Configuration

The following environment variables can be set at run-time or when extending this container:

env description default value
PHP_PM_MAX_CHILDREN php-fpm setting pm.max_children 10
PHP_PM_START_SERVERS php-fpm setting pm.start_servers 3
PHP_MIN_SPARE_SERVERS php-fpm setting pm.min_spare_servers 2
PHP_MAX_SPARE_SERVERS php-fpm setting pm.max_spare_servers 4
PHP_DATE_TIMEZONE php setting timezone UTC
PHP_DISPLAY_ERRORS php setting display_errors Off
PHP_ERROR_REPORTING php setting error_reporting 22527
PHP_MEMORY_LIMIT php setting memory_limit 256M
PHP_MAX_EXECUTION_TIME php setting max_execution_time 90
PHP_POST_MAX_SIZE php setting post_max_size 100M
PHP_UPLOAD_MAX_FILE_SIZE php setting upload_max_file_size 100M

laravel-docker's People

Contributors

fideloper avatar jonathan-lewerissa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-docker's Issues

Cannot connect to postgresql version 15

I use neon tech postgres sql to power my laravel app, neon tech uses pgsql version 15. but when i deploy it to the fly, it doesnt work, the error says:
{"message":"SQLSTATE[08006] [7] ERROR: Endpoint ID is not specified. Either please upgrade the postgres client library (libpq) for SNI support or pass the endpoint ID (first part of the domain name) as a parameter: '?options=endpoint%3D'. See more at https://neon.tech/sni\nERROR: connection is insecure (try using sslmode=require)","context":{"exception":{"class":"PDOException","message":"SQLSTATE[08006] [7] ERROR: Endpoint ID is not specified. Either please upgrade the postgres client library (libpq) for SNI support or pass the endpoint ID (first part of the domain name) as a parameter: '?options=endpoint%3D'


on my windows machine, i simply replace libpq.dll (in php directory ) to the new libpq.dll that i get from postgres installation.
i dont know how to do it via docker. please helpp thanks

Franken PHP

Hello,

We are exploring the use of https://frankenphp.dev/ with our laravel projects.

As you may know, FrankenPHP has garnered positive attention from key figures in the Laravel community, including Taylor Otwell and the Laravel team. It's also anticipated to play a significant role in upcoming Laravel features. Given these developments, we are contemplating a migration to FrankenPHP for our application.

Could you share your thoughts on migrating to this tool?

nginx `log_format` Fly-Client-IP

nginx access log prints the internal IP address for each request
All requests in the access log output appear to come from the same origin IP address - which is only the fly router internal IP ๐Ÿคฆโ€โ™‚๏ธ
Can it please be configured to print the correct IP address whether Fly-Client-IP or X-Forwarded-For or whatever it needs to be ๐Ÿ™

Example:

172.160.103.90 - - [01/Jan/2024:16:38:09 +0000] "GET / HTTP/1.1" 200 77575 "-" "Mozilla/5.0 (Linux; Android 10; Z5156CC Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/119.0.6045.163 Mobile Safari/537.36"

All access log entries have the same exact IP address no matter where the request comes from

How to add script header Strict-Transport-Security

How to add script header like this?

    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
    add_header Permissions-Policy "geolocation=(),midi=(),sync-xhr=(),microphone=(),camera=(),magnetometer=(),gyroscope=(),fullscreen=(self),payment=()";

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.