Create docker-compose file which includes mongo image + some admin panel image (optional but desirable) and of course include images for frontend and backend projects, both can be defined within Dockerfile(s) and referenced from docker-compose later
create .env.local file in root of your application this is where you keep your secrets,
create .env.example which includes needed environment variables but with empty values
add .env.local to gitignore so you don't commit secrets I like to do it this way
.env
.env*.local
!.env.example
first line ensures that if you created simple .env file it is also ignored, only .env.example should be committed and it is forcibly not ignored on line 3
on 2nd line we ignore any .env.local files like, .env.development.local .env.staging.local .env.production.local cause you may want to include different environment variables based on enviroment
Create docker-compose file which includes mongo image + some admin panel image (optional but desirable) and of course include images for frontend and backend projects, both can be defined within Dockerfile(s) and referenced from docker-compose later
create .env.local file in root of your application this is where you keep your secrets, create .env.example which includes needed environment variables but with empty values
add .env.local to gitignore so you don't commit secrets I like to do it this way
first line ensures that if you created simple .env file it is also ignored, only .env.example should be committed and it is forcibly not ignored on line 3 on 2nd line we ignore any .env.local files like, .env.development.local .env.staging.local .env.production.local cause you may want to include different environment variables based on enviroment