.. meta:: :keywords: web2py, framework, deploy, AMAZON Web Services, Elastic Beanstalk Beanstalk 設定の流れ ^^^^^^^^^^^^^^^^^^^^ 最後に、Beanstalk 設定で使用する EB 及び Git コマンドの流れについてまとめます。 #. ``git init`` コマンド実行 アプリケーションに対して Git の初期設定を行います。 .. include:: git_init_command.html #. ``eb init`` コマンド実行 Beanstalk の初期設定をローカル環境で行います。 このコマンドはアプリケーションに対して、一度だけ実行する必要があります。 環境変更などで、再度実行する必要はありません。 .. include:: eb_init_command.html #. ``eb start`` コマンド実行 AWS サーバ側でサービスを起動します。もし Git 初期設定を再度行った場合も、 このコマンドを実行する必要があります。 .. include:: eb_start_command.html #. ``optionsettings`` ファイルの記述変更 アプリケーションに合わせて、ファイルの記述を変更ください。 例 :: [aws:elasticbeanstalk:container:python] WSGIPath=wsgihandler.py NumProcesses=1 StaticFiles=/static=applications/myapp/static/ NumThreads=15 #. ``eb update`` コマンド実行 ``optionsettings`` ファイルの記述を変更した後は、AWSサーバに設定を反映させるため、 このコマンドを実行する必要があります。 .. include:: eb_update_command.html #. Git コマンドによるリポジトリ管理 ``git add`` や ``git commit`` でコードをリポジトリに追加・変更・削除します。 #. ``git aws.push`` コマンド実行 Gitで管理しているアプリケーションコードをサーバにアップロードします。 コードが変更になった場合、実行する必要があります。 .. include:: git_aws_push_command.html #. 管理インターフェース 必要に応じて、 :ref:`aws_beanstalk_admin_setup` を行なってください。 #. ``eb stop`` 及び ``eb delete`` コマンド実行 不要になった Beanstalk 環境を停止・削除します。 .. include:: eb_stop_command.html .. include:: eb_delete_command.html