Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow configuration in yml file #23

Closed
4 tasks done
Jos512 opened this issue May 19, 2018 · 4 comments
Closed
4 tasks done

Allow configuration in yml file #23

Jos512 opened this issue May 19, 2018 · 4 comments

Comments

@Jos512
Copy link

Jos512 commented May 19, 2018

  • I examined open issues in this repository.
  • I read the README file.
  • I Googled for examples of the .s3deploy.tml configuration file.
  • I Googled for how other people use s3deploy.

I like the tool and the advanced route configuration that we can do in the .s3deploy.yml file. But I think the tool would be easier to use from the command line when we can just type s3deploy, and have all other settings loaded from the config file. That makes version control of the settings possible too.


Should this feature already be possible, I ask in this issue to give a quick example in the README file for reference.

My approach at least didn't work:

bucket: example.com
key: xcsds
region: us-east-2
secret: xdsfdsf
source: public

routes:
    - route: "^.+\\.(js|css|svg|ttf)$"
      headers:
         Cache-Control: "max-age=31536000, no-transform, public"
      gzip: true
    - route: "^.+\\.(png|jpg)$"
      headers:
         Cache-Control: "max-age=31536000, no-transform, public"
      gzip: true
    - route: "^.+\\.(html|xml|json|js)$"
      gzip: true
C:\site>s3deploy -try -config .s3deploy-us.yml
s3deploy 2.0.2, commit cc7116a41bbeed8cc9f250b48143c461a1fb4ef6, built at 2018-04-24T20:31:38Z
error: AWS bucket is required

Thanks for the time and effort put in making this tool. 🙂

@bep bep added this to the v2.0.0 milestone May 19, 2018
@bep
Copy link
Owner

bep commented May 19, 2018

Yes, we should fix that. I suspect this is a case of me adding config file support "after the fact".

@bep bep modified the milestones: v2.0.0, v2.1.0 May 19, 2018
@bep
Copy link
Owner

bep commented May 19, 2018

Thinking about this.

bucket: example.com
key: xcsds
region: us-east-2
secret: xdsfdsf
source: public

I don't think key/secret should be in this file, as it this file should be committed to GitHub, secrets should .... stay secret.

@Jos512
Copy link
Author

Jos512 commented May 20, 2018

I don't think key/secret should be in this file, as it this file should be committed to GitHub, secrets should .... stay secret.

Sure for GitHub. But those that use private BitBucket repositories, like me, can safely commit the key and secret in the config file. Perhaps we can add a warning about this in the README file?

@bep
Copy link
Owner

bep commented May 20, 2018

Perhaps we can add a warning about this in the README file?

Yes, OK, that would be good. I guess there are plenty of ways a user can shoot him/herself in the foot.

@bep bep modified the milestones: v2.1.0, v2.2.0 Sep 5, 2018
bep added a commit that referenced this issue Oct 11, 2022
bep added a commit that referenced this issue Oct 11, 2022
bep added a commit that referenced this issue Oct 11, 2022
@bep bep closed this as completed in 44c92f6 Oct 11, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants