Commit aef3f731 by guxiaobai

support docker-compose

parent 1cdc2070
FROM node:alpine
MAINTAINER guxiaobai <sikuan.gu@gmail.com>
RUN mkdir -p /usr/src/app/config
WORKDIR /usr/src/app
COPY package.json /usr/src/app/
COPY yarn.lock /usr/src/app/
RUN yarn install
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
node faye.js node faye.js
curl localhost:9901/faye/client.js curl localhost:9901/faye/client.js
== Run with docker
cp config/redis.yml.example config/redis.yml
(修改 localhost -> redis)
docker-composer up -d
== Deploy == Deploy
......
version: '3'
services:
redis:
image: redis:alpine
app:
build: .
command: node faye.js
volumes:
- .:/usr/src/app
ports:
- "9901:9901"
depends_on:
- redis
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment