AWS Copilot でnginxを動かしてみる。
前提
- 環境
- Mac OS
- AWS CLIを使うことができる
- Dockerがインストールされている。
Copilot のインストール
curl -Lo /usr/local/bin/copilot https://github.com/aws/copilot-cli/releases/download/v0.1.0/copilot-darwin-v0.1.0 && \
chmod +x /usr/local/bin/copilot && \
copilot --help
Dockerfileを用意
mkdir copilot
cd copilot
copilot
ディレクトリの中に下記のDockerfileを作成します。
FROM nginx:alpine
EXPOSE 80
COPY . /usr/share/nginx/html
copilot init
copilot init
CLI上でいくつか質問されるので下記を入力・選択しました。
Application name: nginx-test
Service type: Load Balanced Web Service
Service name: nginx
Dockerfile: ./Dockerfile
確認
ブラウザ
先ほどのcopilot init
の実行結果、最終行にURLが記載されています。
ここにアクセスします。
✔ Deployed nginx, you can access it at http://nginx-Publi-64I230BK4R******5852852.ap-northeast-1.elb.amazonaws.com.
AWS ECS
FARGATEで先ほどのnginxが実行されています。
参考
公式:
https://aws.amazon.com/jp/blogs/news/introducing-aws-copilot/
Author And Source
この問題について(AWS Copilot でnginxを動かしてみる。), 我々は、より多くの情報をここで見つけました https://qiita.com/akkiii/items/69dcff9eabc2b187daef著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .