Closed bake0937 closed 4 years ago
Deploy preview for code-for-sappor-covid19-deploy-preview-free ready!
Built with commit 6cc2c2bb795a55cb7ac46f354f67db7b362e9f0f
https://deploy-preview-466--code-for-sappor-covid19-deploy-preview-free.netlify.app
ありがとうございますー!
⛏ 変更内容
docker-compose up
初回実行時に下記のエラーが出た場合,docker-compose exec app sh
をしてもコンテナは起動されていないためERROR: No container found
が発生します.そのためdocer-compose run
でコンテナを新規で作成し,コンテナ内でyarn install
することでdocker-compose up
がエラーなく実行できることがわかったため修正します.docker-compose up 初回実行時に下記のエラーログ
```bash ❯ docker-compose up Creating network "covid19_default" with the default driver Building app Step 1/8 : FROM node:10.19-alpine ・・省略・・ Successfully tagged covid19_app:latest WARNING: Image for service app was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`. Creating covid19 ... done Attaching to covid19 yarn run v1.21.1 $ cross-env NODE_ENV=development nuxt-ts covid19 | /bin/sh: cross-env: not found error Command failed with exit code 127. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. covid19 exited with code 127 ```docker-compose exec app sh
をしてもコンテナは起動されていないためERROR: No container found
が発生するdocker-compose exec app shでコンテナを新規で作成し,コンテナに入る
``` ❯ docker-compose run app sh /app # yarn install yarn install v1.21.1 [1/4] Resolving packages... [2/4] Fetching packages... ・・省略・・ /app # exit ```docker-compose upがエラーなく実行される
```bash ❯ docker-compose up Starting covid19 ... done Attaching to covid19 yarn run v1.21.1 $ cross-env NODE_ENV=development nuxt-ts covid19 | covid19 | WARN No .env file found in /app. covid19 | covid19 | covid19 | ╭─────────────────────────────────────────────╮ covid19 | │ │ covid19 | │ Nuxt.js v2.12.2 │ covid19 | │ Running in development mode (universal) │ covid19 | │ │ covid19 | │ Listening on: http://172.19.0.2:3000/ │ covid19 | │ │ covid19 | ╰─────────────────────────────────────────────╯ covid19 | ```