Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

cp to .env laravel not working in pipelines

jaymo_h
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 25, 2019

Hi, so it seems my pipeline file is not running the copy command to copy the .env.example file to .env 

I have tried the various copy commands, such as

- cp .env.example .env

- php -r "copy('.env.example', '.env');"

- ln -f -s .env.example .env

 

But none has worked, and the final builds ends up without the laravel .env file, hence the app doesn't run. I don't understand why this is the case. The pipeline runs successfully and pushes to heroku. Here is the bitbucket-pipelines.yml 

image: php:7.3

pipelines:
default:
- step:
caches:
- composer
script:
- cp .env.example .env
- apt-get update
- apt-get install -y unzip git
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
- php -v
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD
- export CACHE_DRIVER=redis
- export SESSION_DRIVER=redis
- export DB_CONNECTION=mysql

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events