Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.PHONY: up down install install-optimized


ENVIRONMENT ?= dev

DOCKER_COMPOSE = docker-compose -f etc/docker/docker-compose.$(ENVIRONMENT).yml
NODE_CLI = docker run --rm -t -v ~/.npm:/.npm -v "$(PWD)":/usr/src/wowanalyzer -w /usr/src/wowanalyzer node:10.4-alpine

# DOCKER
up:
$(DOCKER_COMPOSE) up

down:
$(DOCKER_COMPOSE) down --remove-orphans

# INSTALL
install:
$(NODE_CLI) npm install --non-interactive

# INSTALL OPTIMIZED
install-optimized:
$(NODE_CLI) npm install --non-interactive --production
22 changes: 22 additions & 0 deletions etc/docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '3'
services:

server:
image: node:10.4-alpine
volumes:
- ../..:/usr/src/wowanalyzer:cached
working_dir: /usr/src/wowanalyzer
container_name: wowanalyzer-dev
ports:
- 3000:3000
- 35729:35729
expose:
- 3000
- 35729
environment:
# Webpack dev server has to poll because https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-start-doesnt-detect-changes
- CHOKIDAR_USEPOLLING=true
- NODE_ENV=development
- VIRTUAL_HOST=wow-analyzer.docker
- VIRTUAL_PORT=3000
command: npm start