Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akr4/webapp-deployer
A webapp deploy tool that upload files to s3 with meta data
https://github.com/akr4/webapp-deployer
s3
Last synced: about 1 month ago
JSON representation
A webapp deploy tool that upload files to s3 with meta data
- Host: GitHub
- URL: https://github.com/akr4/webapp-deployer
- Owner: akr4
- License: mit
- Created: 2020-01-28T10:57:24.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-17T00:36:13.000Z (over 2 years ago)
- Last Synced: 2024-04-16T11:07:36.679Z (7 months ago)
- Topics: s3
- Language: Rust
- Homepage:
- Size: 273 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# webapp-deployer
A webapp deploy tool that upload files to s3 with meta data
`webapp-deployer` is a tool like aws cli's `s3 sync` command. It uploads files with setting metadata (e.g., `content-type`) along with a config file.
## How it works
`webapp-deployer` first delete all files in the given bucket. After that, it walks through all files under the given webapp directory. If a file matches a pattern, then it does an action. `Upload` action uploads the file. `Exclude` action skip the file. If none of the patterns matches, the file is skipped.
```
% webapp-deployer --help
webapp-deployer 1.0.0
Deploy webapp to s3USAGE:
webapp-deployer [FLAGS]FLAGS:
-d, --dry-run
-h, --help Prints help information
-V, --version Prints version informationARGS:
```## Config file
A config file is a toml format file, and that is a set of `instruction` for files.
An example instruction looks like as follows:
```toml
[[instructions]]
pattern = "^static/css/.*\\.css$"
action = "Upload"
[instructions.meta]
content_type = "text/css"
cache_control = "max-age=31536000"
```|property |required|description|
|-|-|-|
|pattern|Yes|file path regex pattern|
|action|Yes|Upload or Exclude|
|meta.content_type|No|content-type value|
|meta.cache-control|No|cache-control value|## Environment variables
`webapp-deployer` takes `AWS_PROFILE` and `AWS_REGION` same as aws cli.
## Usage examples
```
% webapp-deployer --dry-run config.toml ./build my-webapp-bucket
``````
% AWS_PROFILE=admin AWS_REGION=us-east-1 webapp-deployer config.toml ./build my-webapp-bucket
```![](docs/screenshot1.png)