docker / app

Make your Docker Compose applications reusable, and share them on Docker Hub
Apache License 2.0
1.57k stars 177 forks source link

Add warnings for env_file entries not copied #610

Closed ulyssessouza closed 4 years ago

ulyssessouza commented 5 years ago

As 'env_file' entries are not taken in account, we warn the user to copy that and fix it's compose file.

- What I did Add a warning for each env_file entry on each service

- How I did it By checking the env_file block for each service entry in docker app init

- How to verify it Create a docker-compose.yml file with:

version: '3.7'
services:
  front:
    image: "nginx"
    env_file:
     - "myenv.env1"
     - "myenv.env2"

Run:

docker app init --compose-file docker-compose.yml myapp

- Description for the changelog Add warnings for env_file entries not copied

- A picture of a cute animal (not mandatory but encouraged) sweater-baby-goat

codecov[bot] commented 5 years ago

Codecov Report

Merging #610 into master will decrease coverage by 0.03%. The diff coverage is 70.9%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #610      +/-   ##
==========================================
- Coverage   70.57%   70.53%   -0.04%     
==========================================
  Files          62       62              
  Lines        3208     3248      +40     
==========================================
+ Hits         2264     2291      +27     
- Misses        639      647       +8     
- Partials      305      310       +5
Impacted Files Coverage Δ
internal/commands/init.go 86.66% <100%> (ø) :arrow_up:
internal/packager/init.go 63.26% <70.37%> (+1.58%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 44932b6...d2c567b. Read the comment docs.

GordonTheTurtle commented 4 years ago

Please sign your commits following these rules: https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work The easiest way to do this is to amend the last commit:

$ git clone -b "add-env_file-warning" git@github.com:ulyssessouza/app.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354452128
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.