Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Looking for bitbucket-pipeline.yml recommendations for Laravel 9+ projects.
The "official" recommendation is for Laravel 5, and is out of date.
Are others successfully using a 'sail' / 'composer' / or 'php8.x' image or configuration?
DB: sqlite / memory?
I've wasted a lot of time and build minutes and frustrated with little progress.
Thank you!
Hi there,
Thank you for reaching out to Atlassian Community.
When I accessed the Laravel 9's website, I was able to see that they have their own built Docker image:
laravelsail/php82-composer
I would like to recommend you to give it a try and let us know if it works
I got a simple install & test step to run using PHP 8.3, Laravel 11 and Postgres as follows:
image: php:8.3-fpm
definitions:
services:
postgres:
image: postgres:16
environment:
POSTGRES_HOST_AUTH_METHOD: "trust"
pipelines:
branches:
master:
- step:
name: Install & Test
caches:
- composer
script:
- apt-get update && apt-get install -qy git unzip libzip-dev libpq-dev
- docker-php-ext-install zip pdo pdo_pgsql
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
- ln -f -s .env.pipelines .env
- php artisan migrate --force
- php artisan test
services:
- postgres
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have almost the same setup. But i am not able to connect to the postgres database using the .env. I have tried alot of different variations in my .env file but was not able to find the solution.
definitions:
services:
postgres:
image: postgres:16
environment:
POSTGRES_HOST_AUTH_METHOD: "trust"
PGPASSWORD: 'secret'
POSTGRES_DB: 'laravel'
POSTGRES_USER: 'laravel'
POSTGRES_PASSWORD: 'secret'
(I have also tried removing the auth method. )
Here is my .env
DB_CONNECTION=pgsql
DB_HOST=postgres # tried 0.0.0.0, localhost, 127.0.0.1
DB_PORT=5432
DB_DATABASE=laravel
DB_USERNAME=laravel
DB_PASSWORD=secret
If possible please share your .env file content. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.