amazon-web-services - 如何从 Codeship 部署到 AWS S3?

标签 amazon-web-services deployment amazon-s3 codeship

我有一个可能有点傻的问题,我正在尝试使用 codeship 部署一个静态站点,但我无法理解文档:

https://codeship.com/documentation/continuous-deployment/deployment-to-aws-codedeploy/

目前设置方式略有不同 ,我不知道在“本地路径”输入中写什么

enter image description here

最佳答案

您应该将“本地路径”解释为对虚拟机中工作目录的引用。

我花了一段时间才弄明白。您可以在克隆步骤中看到这一点。你会看到这样的事情。

克隆进'/home/rof/src/bitbucket.org/<your_user>/<you_repository>'
路径 /home/rof/src/bitbucket.org/<your_user>/<you_repository>就是你要找的。

如果您想上传该目录中的内容,只需连接其余部分,如 /home/rof/src/bitbucket.org/<your_user>/<you_repository>/internal/path
例如:
你可以编译你的 NodeJs App 并压缩 dist目录以构建工件,然后将其上传到 S3。

它会是这样的。在您的设置命令中:

nvm use 5.6.0
npm install
npm run deploy
tar -zcvf artifact.tar.gz dist/
mkdir upload/
mv artifact.tar.gz upload/

最后你的“本地路径”是:/home/rof/src/bitbucket.org/<your_user>/<you_repository>/upload
希望这有帮助!。

关于amazon-web-services - 如何从 Codeship 部署到 AWS S3?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35347722/

相关文章:

sql - 如何仅在表存在时删除 Amazon Redshift 中的表

reactjs - 如何将 next.js 9 部署到 aws lambda

postgresql - 管理数据库更改

amazon-s3 - 是否可以在不创建 ObjectBucketClaim(OBC) 的情况下创建 Noobaa 存储桶?

java - AWS S3 : Uploading large file fails with ResetException: Failed to reset the request input stream

java - Elastic Beanstalk 上的 Renjin 'IOException while loading package'

java - AWS Lambda Java函数成功但超时

amazon-web-services - 我应该使用 AWS Elastic Beanstalk 还是 Amazon EC2 Container Service (ECS) 来扩展 Docker 容器?

使用关系数据库部署 Java Web 应用程序

postgresql - 无法使用 aws_s3.query_export_to_s3 函数将 AWS RDS Postgres 表导出到 S3 中的 CSV