nickredmark / staart

A starter library for node projects with user accounts.
MIT License
313 stars 39 forks source link

Deploy failed on OSX #17

Closed Drasek closed 6 years ago

Drasek commented 6 years ago

I get following error trying "yarn deploy" inside the examples/staart folder:

$ docker rm -f staart || true
Error response from daemon: No such container: staart
$ docker run -p 7880:3000 -d --link staart-mongo:mongo --name staart staart && yarn docker:logs
docker: Error response from daemon: could not get container for staart-mongo: No such container: staart-mongo.
See 'docker run --help'.
error Command failed with exit code 125.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

the complete log:

✘ ✝  machwerk/ODAPS/www  yarn deploy
yarn run v1.3.2
$ yarn docker:build && yarn docker:clean && yarn docker:run
$ docker build -t staart .
Sending build context to Docker daemon  97.18MB
Step 1/9 : FROM node:8
 ---> b87c2ad8344d
Step 2/9 : RUN mkdir -p /usr/src/app
 ---> Using cache
 ---> 5b0b73a421a7
Step 3/9 : WORKDIR /usr/src/app
 ---> Using cache
 ---> 80cb71cb7c3a
Step 4/9 : COPY . .
 ---> 0ef42d297cd7
Step 5/9 : RUN npm install -g yarn
 ---> Running in 5ad7e6cb6371
npm WARN deprecated yarn@1.3.2: It is recommended to install Yarn using the native installation method for your environment. See https://yarnpkg.com/en/docs/install
/usr/local/bin/yarn -> /usr/local/lib/node_modules/yarn/bin/yarn.js
/usr/local/bin/yarnpkg -> /usr/local/lib/node_modules/yarn/bin/yarn.js
+ yarn@1.3.2
added 1 package in 0.994s
 ---> 894971eabb37
Removing intermediate container 5ad7e6cb6371
Step 6/9 : RUN yarn --pure-lockfile
 ---> Running in 398f4a8f7ac6
yarn install v1.3.2
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > next@4.1.4" has unmet peer dependency "react@^16.0.0".
warning " > next@4.1.4" has unmet peer dependency "react-dom@^16.0.0".
warning "next > styled-jsx@2.1.1" has unmet peer dependency "react@15.x.x || 16.x.x".
warning "next > react-hot-loader > redbox-react@1.5.0" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0-beta || ^16.0.0".
warning "next > react-hot-loader > redbox-react@1.5.0" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0-beta || ^16.0.0".
warning "ooth-client-react > recompose@0.26.0" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "ooth-client-react-next-apollo > react-apollo@2.0.1" has unmet peer dependency "react@0.14.x || 15.* || ^15.0.0 || ^16.0.0".
warning "ooth-client-react-next-apollo > react-dom@16.1.1" has unmet peer dependency "react@^16.0.0".
[4/4] Building fresh packages...
Done in 22.43s.
 ---> 9b5f11d7c020
Removing intermediate container 398f4a8f7ac6
Step 7/9 : RUN yarn build
 ---> Running in 2057aaee7b2e
yarn run v1.3.2
$ next build
Done in 13.44s.
 ---> 6dbdebebc338
Removing intermediate container 2057aaee7b2e
Step 8/9 : EXPOSE 3000
 ---> Running in b8e0bd1c84cf
 ---> 0d38cc237ed9
Removing intermediate container b8e0bd1c84cf
Step 9/9 : CMD yarn start
 ---> Running in 3d10d6ae670b
 ---> 5f2ced3a100a
Removing intermediate container 3d10d6ae670b
Successfully built 5f2ced3a100a
Successfully tagged staart:latest
$ docker rm -f staart || true
Error response from daemon: No such container: staart
$ docker run -p 7880:3000 -d --link staart-mongo:mongo --name staart staart && yarn docker:logs
docker: Error response from daemon: could not get container for staart-mongo: No such container: staart-mongo.
See 'docker run --help'.
error Command failed with exit code 125.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
nickredmark commented 6 years ago

Hey there! Yes, sorry there are no deploy instructions. The Dockerfile assumes there is a mongo instance called staart-mongo. You can create that with the following command:

docker pull mongo
docker run --name staart-mongo -d mongo

Please let me know if it worked (there might be some other details that aren't coming to mind right now).

I'm going to keep this ticket open until there are docker/deployment instructions (and a docker-compose file).

nickredmark commented 6 years ago

now there's a docker-compose file that takes care of that.