Upgrade to Pro — share decks privately, control downloads, hide ads and more …

higobashi-aws-7-ecs

sutetotanuki
October 25, 2018

 higobashi-aws-7-ecs

sutetotanuki

October 25, 2018
Tweet

More Decks by sutetotanuki

Other Decks in Technology

Transcript

  1. %PDLFSͰ࣮ݱͯ͠Δൣғ w ϛυϧ΢ΣΞ .Z42- 3FEJT  w ΞϓϦέʔγϣϯ (P 3BJMT

     w ͨͩ͠։ൃ࣌͸*%&ͷิ׬΍ίϚϯυ࣮ߦ ͕खؒͷͨΊ։ൃ؀ڥʹ௚઀Πϯετʔϧ ͍ͯ͠Δ  
  2. خ͍͠ͱ͜Ζ w ϛυϧ΢ΣΞͷόʔδϣϯ΍ઃఆΛ։ൃϝϯόʔ Ͱ߹ΘͤΒΕΔ NZTRM SFEJT FUD  w ຊ൪؀ڥʹ͍ۙ؀ڥͰ։ൃͰ͖ΔͷͰຊ൪Ͱ͠

    ͔͓͖ͳ͍ෆ۩߹͕։ൃ࣌ʹ͓͖Δ w $*࣌ʹϏϧυͨ͠ΠϝʔδͰσϓϩΠͰ͖Δͷ Ͱຊ൪σϓϩΠ࣌ʹࣄނ͕ى͖ʹ͍͘  
  3. ؀ڥΛԚ͞ͳ͍   # データベースを作成 docker-compose run api rails db:create

    docker-compose run api rails db:migrate EPDLFSDPNQPTFΛ࢖͑͹ ຊདྷඞཁͳϥΠϒϥϦͷΠϯετʔϧΛ͠ͳ͍Ͱ΋ ॳظηοτΞοϓ͕Ͱ͖Δ
  4.   FROM golang:1.9 AS builder # ① WORKDIR /go/src/github.com/example/api

    COPY . . ENV GOOS=linux \ GOARCH=amd64 # ② RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh \ && dep ensure -v \ && bash ./build.sh ENTRYPOINT go test ./... FROM alpine # ③ COPY --from=builder /go/src/github.com/example/api /api ENTRYPOINT ["/api"] ᶃ(01"5)഑ԼʹιʔεΛ഑ஔ ᶄϥΠϒϥϦΛΠϯετʔϧ࣮͠ߦϑΝΠϧΛϏϧυ͢Δ ᶅCVJMEFSͰϏϧυ࣮ͨ͠ߦϑΝΠϧΛίϐʔ