Use nodemon to automatically restart the server in dev
This commit is contained in:
parent
ba05a5f90a
commit
89239a7c42
|
@ -1,5 +1,9 @@
|
|||
FROM node:8
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN yarn global add nodemon
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn --pure-lockfile
|
||||
COPY . .
|
|
@ -1,7 +0,0 @@
|
|||
FROM node:8
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn --pure-lockfile
|
||||
COPY . .
|
||||
|
||||
CMD ["node", "server/ingestLogs.js"]
|
|
@ -3,40 +3,39 @@ version: "3"
|
|||
networks:
|
||||
localnet: {}
|
||||
|
||||
volumes:
|
||||
pkgvol: {}
|
||||
|
||||
services:
|
||||
|
||||
cache:
|
||||
image: redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
ports:
|
||||
- "6379:6379"
|
||||
networks:
|
||||
- localnet
|
||||
|
||||
server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.server
|
||||
build: .
|
||||
image: server
|
||||
command: nodemon --ignore client server.js
|
||||
env_file: .env
|
||||
volumes:
|
||||
- .:/app
|
||||
depends_on:
|
||||
- cache
|
||||
ports:
|
||||
- "8080:5000"
|
||||
volumes:
|
||||
- pkgvol:/packages
|
||||
networks:
|
||||
- localnet
|
||||
env_file: .env
|
||||
depends_on:
|
||||
- cache
|
||||
|
||||
worker:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.worker
|
||||
networks:
|
||||
- localnet
|
||||
build: .
|
||||
image: worker
|
||||
command: nodemon --ignore client server/ingestLogs.js
|
||||
env_file: .env
|
||||
volumes:
|
||||
- .:/app
|
||||
depends_on:
|
||||
- cache
|
||||
networks:
|
||||
- localnet
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "echo 'Use `docker-compose up` to start the server",
|
||||
"start": "docker-compose up",
|
||||
"build": "NODE_ENV=production webpack -p --json > server/stats.json",
|
||||
"lint": "eslint client && eslint server",
|
||||
"test": "jest"
|
||||
|
|
Loading…
Reference in New Issue