SunsetRiders / nodejs-scaffold

A Node.js scaffolding for a web client with Express.js
0 stars 1 forks source link

Docker setup for development environment #19

Closed gvillalta99 closed 5 months ago

gvillalta99 commented 8 years ago

Using bin/docker-dev you can manage the application:

The development environment is stable at my machine (Ubuntu 16.04), I will need to test it on others developers' machine, as described on #16 .

gvillalta99 commented 8 years ago

@msughawara can you help me testing this setup on your machine?

msughawara commented 8 years ago

The following error has being raised :

mkenjis@ubuntusrv:~/nodejs-scaffold$ bin/docker-dev up ERROR: Couldn't find env file: /home/mkenjis/nodejs-scaffold/.env

mkenjis@ubuntusrv:~/nodejs-scaffold$ ls -l total 44 drwxrwxr-x 2 mkenjis mkenjis 4096 Jun 14 10:13 bin drwxrwxr-x 2 mkenjis mkenjis 4096 Jun 14 09:06 controllers -rw-rw-r-- 1 mkenjis mkenjis 199 Jun 14 10:13 docker-compose.yml -rw-rw-r-- 1 mkenjis mkenjis 108 Jun 14 09:06 Dockerfile -rw-rw-r-- 1 mkenjis mkenjis 1346 Jun 14 10:13 gulpfile.js -rw-rw-r-- 1 mkenjis mkenjis 2091 Jun 14 10:13 package.json drwxrwxr-x 4 mkenjis mkenjis 4096 Jun 14 09:06 public -rw-rw-r-- 1 mkenjis mkenjis 1482 Jun 14 09:06 README.md -rw-rw-r-- 1 mkenjis mkenjis 2033 Jun 14 09:06 server.js drwxrwxr-x 2 mkenjis mkenjis 4096 Jun 14 10:13 test drwxrwxr-x 3 mkenjis mkenjis 4096 Jun 14 09:06 views mkenjis@ubuntusrv:~/nodejs-scaffold$

gvillalta99 commented 8 years ago

@msughawara you can copy the .env.example to solve this issue with:

ln -s .env.example .env

And this should solve your issue.

msughawara commented 8 years ago

I have run bin/build-dev and the following error has been raised:

........... Building web Step 1 : FROM node:6.2 ---> 72d4ec634f1f Step 2 : RUN mkdir /app ---> Using cache ---> 65f2c56f3f7b Step 3 : ADD . /app ---> Using cache ---> 5ce15232b334 Step 4 : WORKDIR /app ---> Using cache ---> 98b7b9b213d7 Step 5 : RUN npm install ---> Using cache ---> 3b6e614efbde Step 6 : ENV PATH /app/node_modules/.bin:$PATH ---> Using cache ---> 2e2fd6ac65d5 Successfully built 2e2fd6ac65d5 Creating network "nodejsscaffold_default" with the default driver Creating nodejsscaffold_node_1 Creating nodejsscaffold_web_1 ERROR: Container command 'gulp' not found or does not exist.

gvillalta99 commented 8 years ago

@msughawara can you run the following and copy/paste the result here?

docker-compose run web env
msughawara commented 8 years ago

Here is result output:

mkenjis@ubuntusrv:~/nodejs-scaffold$ /usr/local/bin/docker-compose run web env Starting nodejsscaffold_node_1 PATH=/app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=7b98855d0328 TERM=xterm MONGODB=mongodb://mongo:27017/database SESSION_SECRET=change this secret before deploying it to production NPM_CONFIG_LOGLEVEL=info NODE_VERSION=6.2.1 HOME=/root