Skip to content

Commit 77dcaf8

Browse files
committed
[update] wip nodejs readme
1 parent 4333da8 commit 77dcaf8

File tree

1 file changed

+45
-2
lines changed

1 file changed

+45
-2
lines changed

README.md

+45-2
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,6 @@ services:
349349
restart: always
350350
image: cookbook/django-production
351351
container_name: cookbook-d-django
352-
expose:
353-
- '${DJANGO_PORT}'
354352
command: /bin/sh -c "cd /opt/app; gunicorn mysite.wsgi -w 4 --max-requests 1000 --timeout 60 -b 0.0.0.0:${DJANGO_PORT}"
355353
```
356354
Logs
@@ -371,6 +369,51 @@ Note: to know more about why use Gunicorn see the following link:
371369
#### Development
372370
To work with django in development mode is necessary to run it and if it sees a change is restarted, to achieve this directly run the command in development mode and review the logs to see its changing state.
373371

372+
##### Example:
373+
Docker-compose.yml
374+
```
375+
services:
376+
django:
377+
image: cookbook/django-development
378+
container_name: cookbook-d-django-development
379+
volumes:
380+
- ../../app:/opt/app
381+
command: /bin/sh -c "cd /opt/app; python manage.py runserver 0.0.0.0:${DJANGO_PORT}"
382+
```
383+
Logs
384+
```
385+
$ docker logs -f cookbook-d-django-development
386+
[11/Dec/2016 20:49:10] "GET / HTTP/1.1" 200 40
387+
Not Found: /favicon.ico
388+
[11/Dec/2016 20:49:10] "GET /favicon.ico HTTP/1.1" 404 1944
389+
```
390+
391+
[Back to Index](#index)
392+
393+
### Nodejs
394+
Node.js is a server-side engine based on Google's V8 engine.
395+
396+
#### Production
397+
Nodejs in production mode can be run directly on the container
398+
399+
##### Example:
400+
Docker-compose.yml
401+
```
402+
services:
403+
nodejs:
404+
image: cookbook/n-nodejs-production
405+
container_name: cookbook-n-nodejs
406+
command: /bin/sh -c "cd /opt/app/; node server.js"
407+
```
408+
Logs
409+
```
410+
$ docker logs -f cookbook-d-nodejs
411+
412+
```
413+
414+
#### Development
415+
To work with django in development mode is necessary to run it and if it sees a change is restarted, to achieve this directly run the command in development mode and review the logs to see its changing state.
416+
374417
##### Example:
375418
Docker-compose.yml
376419
```

0 commit comments

Comments
 (0)