Giter VIP home page Giter VIP logo

container-apps05's Introduction

title
golang gin Azure Container Apps sample project

概要

  1. golang + gin
  2. docker
  3. test
  4. coverage
  5. GitHub container registry
  6. vscode devcontainer
  7. deploy to azure container apps

5. GitHub container registry

GitHubの自分のアカウントのPackagesを使うには下記の設定をする

  1. PATを作成する。Creating a personal access token
  2. .envrc.local.template を .envrc.local にコピーし、GitHubユーザー名と作成したPATを入れる

VSCodeのdevcontainerで開いて、Makefileがあるディレクトリでターミナルを開く。設定ができていれば、下記コマンドで、イメージがビルドされてpushされる。

make gh-login build push

7. deploy to azure container apps

自分の環境に合わせて、下記の2つを設定する。

export RESOURCE_GROUP=<your resource group name>
export CR_USER=<your github account name>

make setup では、下記の内容を行っている。ここでは、container appsは作らず、別途デプロイする。

  • az cliへの containerapp extensionのインストール
  • github container repo(ghcr.io)へのログイン
  • container apps で使うAzure リソースの作成
make setup

container apps の作成。deploy/main.bicep は、必要なリソース一式を作成する。デプロイには、docker imageが必要なので、ビルド、プッシュして、main.bicep deployの順で実行する。

make build deploy

更新、コードを修正したら、新しいイメージをプッシュして、app-deployでcontainerapps リソースを更新する。

make build app-deploy

TODO

説明を追加する

container-apps05's People

Contributors

takekazuomi avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.