Jump to content
Sign in to follow this  

How to rename file .env of docker project ?

Recommended Posts

I have small docker(version: '3.1') project with laravel 5 app
I have file .env where some path vars are set abd in docker-compose.yml these vars are set.
Looks like .env is config file by default and I would like to change name of this config file,
as my laravel app also has .env file and that raise some confusion in the project.
If there is a way to rename .env of docker project and where such option can be set ?


Share this post

Link to post
Share on other sites

Not that I'm aware of.  With that said, docker only uses the .env file to set variables that are used during the docker-compose pre-processing stage.  

You also might be well advised to have some directory structure where your laravel app code is not in the root of the project where it would conflict with docker files. 

I would also suggest taking a look at how Laradock does things.

  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.