diff options
author | startxfr <clarue@startx.fr> | 2016-10-30 14:24:48 +0100 |
---|---|---|
committer | startxfr <clarue@startx.fr> | 2016-10-30 14:24:48 +0100 |
commit | 275245093c596777195bfd8a7922c6d09d19ed2c (patch) | |
tree | 1a11e822a23e6d8a9f8416b91890e5572ea90e12 /Services | |
parent | 20eb425e1ab95b9870fdf71f969c0d5189a09e9a (diff) | |
download | phpmyadmin-275245093c596777195bfd8a7922c6d09d19ed2c.tar.gz phpmyadmin-275245093c596777195bfd8a7922c6d09d19ed2c.tar.bz2 phpmyadmin-275245093c596777195bfd8a7922c6d09d19ed2c.tar.xz phpmyadmin-275245093c596777195bfd8a7922c6d09d19ed2c.zip |
change nodejs port to 8080
Diffstat (limited to 'Services')
-rw-r--r-- | Services/nodejs/Dockerfile | 2 | ||||
-rw-r--r-- | Services/nodejs/README.md | 10 | ||||
-rw-r--r-- | Services/nodejs/app.js | 2 | ||||
-rw-r--r-- | Services/nodejs/docker-compose.yml | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/Services/nodejs/Dockerfile b/Services/nodejs/Dockerfile index 42101ba..f2b1312 100644 --- a/Services/nodejs/Dockerfile +++ b/Services/nodejs/Dockerfile @@ -19,6 +19,6 @@ COPY *.js $APP_PATH/ COPY *.json $APP_PATH/ RUN cd $APP_PATH && npm install -production -EXPOSE 8000 +EXPOSE 8080 VOLUME [ $DATA_PATH , $LOG_PATH ] CMD [ "/bin/run.sh" ]
\ No newline at end of file diff --git a/Services/nodejs/README.md b/Services/nodejs/README.md index 806f2d5..42e97bd 100644 --- a/Services/nodejs/README.md +++ b/Services/nodejs/README.md @@ -44,7 +44,7 @@ service: environment: CONTAINER_INSTANCE: "service-nodejs" ports: - - "1000:8000" + - "1000:8080" ``` * sample docker-compose.yml with port exposed only to linked services ``` @@ -54,7 +54,7 @@ service: environment: CONTAINER_INSTANCE: "service-nodejs" expose: - - "8000" + - "8080" ``` * sample docker-compose.yml using data container ``` @@ -97,7 +97,7 @@ CMD ["/bin/run.sh"] | Port | Description | |-------|--------------------------------------------------------------------------| -| 8000 | network port used to communicate with the running application. Network protocol depend on the running app content. +| 8080 | network port used to communicate with the running application. Network protocol depend on the running app content. ## Exposed volumes @@ -125,8 +125,8 @@ You must have a working environment with the source code of this repository. Rea 1. Jump into the container directory with `cd Services/nodejs` 2. Build the container using `docker build -t sv-nodejs .` 3. Run this container - 1. Interactively with `docker run -p 8000:8000 -v /logs -it sv-nodejs`. If you add a second parameter (like `/bin/bash`) to will run this command instead of the default entrypoint. Usefull to interact with this container (ex: `/bin/bash`, `/bin/ps -a`, `/bin/df -h`,...) - 2. As a daemon with `docker run -p 8000:8000 -v /logs -d sv-nodejs` + 1. Interactively with `docker run -p 8080:8080 -v /logs -it sv-nodejs`. If you add a second parameter (like `/bin/bash`) to will run this command instead of the default entrypoint. Usefull to interact with this container (ex: `/bin/bash`, `/bin/ps -a`, `/bin/df -h`,...) + 2. As a daemon with `docker run -p 8080:8080 -v /logs -d sv-nodejs` ### Build & run a container using `docker-compose` diff --git a/Services/nodejs/app.js b/Services/nodejs/app.js index ea1bcca..baf8d32 100644 --- a/Services/nodejs/app.js +++ b/Services/nodejs/app.js @@ -4,5 +4,5 @@ var server = http.createServer(function (request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.end("Hello World\n"); }); -server.listen(8000); +server.listen(8080); console.log("Server is running");
\ No newline at end of file diff --git a/Services/nodejs/docker-compose.yml b/Services/nodejs/docker-compose.yml index 2d2f1b4..a2374ed 100644 --- a/Services/nodejs/docker-compose.yml +++ b/Services/nodejs/docker-compose.yml @@ -6,7 +6,7 @@ server: cpu_shares: 4 restart: "on-failure:2" ports: - - "9221:8000" + - "9221:8080" environment: CONTAINER_TYPE: "service" CONTAINER_SERVICE: "nodejs" |