Comments (6)
@gpolyn as a side note, I think it's better first to compile a docker image before pushing it to a DigitalOcean droplet or Docker repository. Otherwise, while your app is compiling, your server may become less responsive. Take a look at tools/publish.js
files, which compiles a Docker image and pushes it to a web server over SSH. E.g. if your server has Docker / Docker Compose running and a production docker-compose.yml
, you just run node tools/publish
from your local machine or CI and it compiles and deploys your app.
from relay-starter-kit.
@koistya I see: deployment is meant to occur from local or master machine, which is why the ssh stuff matters. So then, my path is to configure the remote server such that I can 1) ssh into it using some preferred hostname and 2) run deploy locally and expect deployment to occur. Will check out.
from relay-starter-kit.
Regarding #1, when you provision a new VM/droplet, it usually comes with SSH access pre-configured. You would just need to tweak your local SSH client config, e.g. you can put your SSH settings in ~/.ssh/config and use just server's name/alias when you need to connect, e.g. ssh web01
as opposed to ssh [email protected]
.
from relay-starter-kit.
@koistya per your guidance, I've corrected my approach, but I still fail in my effort.
- initialize Ubuntu 16.04 remote instance, somedroplet (Digital Ocean)
ssh somedroplet
from my local client- somedroplet is provisioned with Docker version 17.06.0-ce, docker-compose version 1.11.2
- from inside the repo (commit 6d698...) on my local client I execute
node tools/publish somedroplet
I include the full log farther below, but here I highlight the critical error:
ERROR: for nginx Cannot start service nginx: oci runtime error: container_linux.go:262: starting container process caused "process_linux.go:339: container init caused \"rootfs_linux.go:57: mounting \\\"/usr/src/app/config/nginx.conf\\\" to rootfs \\\"/var/lib/docker/aufs/mnt/b034a377fa57497cc3af262028c75d6d254e691bf7657a207c1261dbe31e6872\\\" at \\\"/var/lib/docker/aufs/mnt/b034a377fa57497cc3af262028c75d6d254e691bf7657a207c1261dbe31e6872/etc/nginx/conf.d/default.conf\\\" caused \\\"not a directory\\\"\""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
Seems like we are to have prepared the volume mounts on the remote server side (somedroplet), but is that correct? For example, in an earlier attempt, I encountered an error associated with the api
compose step, which I remedied by adding the dir /usr/src/app
on somedroplet. What am I missing?
yarn install v0.24.6
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.91s.
yarn run v0.24.6
$ node tools/build.js
Starting 'build'...
src/DataLoaders.js -> build/DataLoaders.js
src/app.js -> build/app.js
src/db.js -> build/db.js
src/passport.js -> build/passport.js
src/redis.js -> build/redis.js
src/email.js -> build/email.js
src/server.js -> build/server.js
src/schema/Comment.js -> build/schema/Comment.js
src/schema/README.md -> build/schema/README.md
src/schema/CommentType.js -> build/schema/CommentType.js
src/schema/EmailType.js -> build/schema/EmailType.js
src/schema/Story.js -> build/schema/Story.js
src/schema/Node.js -> build/schema/Node.js
src/schema/UserType.js -> build/schema/UserType.js
src/schema/StoryType.js -> build/schema/StoryType.js
src/schema/User.js -> build/schema/User.js
src/schema/ValidationError.js -> build/schema/ValidationError.js
src/schema/index.js -> build/schema/index.js
src/routes/account.js -> build/routes/account.js
src/emails/welcome/subject.hbs -> build/emails/welcome/subject.js
src/emails/welcome/html.hbs -> build/emails/welcome/html.js
Finished 'build' after 3765ms
Done in 7.94s.
Sending build context to Docker daemon 858.6kB
Step 1/5 : FROM node:8.1.2-alpine
---> 74b5cf4a0274
Step 2/5 : WORKDIR /usr/src/app
---> 3e668d4e1138
Removing intermediate container 0ed8e7a6cbb4
Step 3/5 : COPY . .
---> eedaf7523757
Removing intermediate container 419d390e415f
Step 4/5 : RUN yarn install --production --no-progress
---> Running in eb442d923074
yarn install v0.24.6
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 20.45s.
---> 3a3900434e0a
Removing intermediate container eb442d923074
Step 5/5 : CMD node build/server.js
---> Running in f3086f6de944
---> ade9e7550cac
Removing intermediate container f3086f6de944
Successfully built ade9e7550cac
Successfully tagged api:latest
Loaded image: api:latest
Creating volume "app_redis" with default driver
Creating volume "app_db" with default driver
Creating volume "app_yarn" with default driver
Creating app_redis_1
Creating app_db_1
Creating app_api_1
Creating app_nginx_1
ERROR: for nginx Cannot start service nginx: oci runtime error: container_linux.go:262: starting container process caused "process_linux.go:339: container init caused \"rootfs_linux.go:57: mounting \\\"/usr/src/app/config/nginx.conf\\\" to rootfs \\\"/var/lib/docker/aufs/mnt/b034a377fa57497cc3af262028c75d6d254e691bf7657a207c1261dbe31e6872\\\" at \\\"/var/lib/docker/aufs/mnt/b034a377fa57497cc3af262028c75d6d254e691bf7657a207c1261dbe31e6872/etc/nginx/conf.d/default.conf\\\" caused \\\"not a directory\\\"\""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
Encountered errors while bringing up the project.
from relay-starter-kit.
@gpolyn the configuration files, e.g. /user/src/app/config/nginx.conf
, referenced in the production docker-compose.yml
file are missing on the server. Take a look here https://gist.github.com/koistya/08d3654862f654e756674491593e6fe2
from relay-starter-kit.
@koistya this info was helpful, but running into repository web not found: does not exist or no pull access
when using the gist example files placed on the server (slightly modified for the correct domain).
Any thoughts?
from relay-starter-kit.
Related Issues (20)
- Adding controller/service layer for business logic HOT 3
- MongoDB instead of PostgreSQL HOT 1
- Where is the Passport.js implementation? HOT 1
- Dependabot can't resolve your JavaScript dependency files
- File Upload HOT 3
- Dependabot can't resolve your JavaScript dependency files
- Dependabot can't resolve your JavaScript dependency files
- big int HOT 1
- SyntaxError: Unexpected token = HOT 2
- Missing quotation marks in setup.js HOT 2
- Feature Request: "New Feature Walkthrough"
- Add the flexibility of multiple roles HOT 1
- Bug with emails that have "." in them breaks username requirements
- README.md out of date - no "setup" script HOT 3
- Nightly build fails
- Account settings page does not update
- docker image for the repo HOT 1
- error while run yarn setup HOT 1
- Readme.md has not been updated. HOT 1
- app-deploy.js file does not exists
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from relay-starter-kit.