How to deploy same app but with a different .env file?

Author: chillbertCreated Nov 6, 2024Updated Nov 8, 2024

Before I deployed with $sidekick launch my app with the .env file - now I created a .env.production file and want to deploy the same app but this time with the new .env.production file. How do I do that? Since $sidekick deploy does use the .env file. I think changing in sidekick.yml file to: file: .env.production doesn't do anything right?

and how can we delete an existing docker container already running on the VPS? Just by deleting the sidekick.yml file locally and re-init and re-launching? (Beside loging into the vps via ssh and stopping, deleting, pruning the container manually; what I did... but then I get this error on deployment:

Please enter which env file you would like to load .env.production 8:23PM INFO Env File: Detected - Loading env vars from .env.production

                          Launching your application on your VPS                                

✔ VPS is reachable
✔ Latest docker image built
✔ Image saved successfully
⚠ Moving image to your server
└── error running command - mkdir myApp: - mkdir: cannot create directory ‘myApp’: File