Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
dev mode setup
  • Loading branch information
hoatle committed Jul 6, 2017
1 parent a2228e9 commit b0a7ac4
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env-common
@@ -0,0 +1 @@
# common environtment variables for dev, prod, review modes
1 change: 1 addition & 0 deletions .env-dev
@@ -0,0 +1 @@
# specific environtment variables for dev mode
26 changes: 26 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,26 @@
version: '3'

services:

dev:
image: ${DOCKER_IMAGE_DEV:-node:8.1.3-alpine}
working_dir: /opt/app
command: sh run-dev.sh
environment:
NODE_ENV: development
PORT: 3000
VIRTUAL_HOST: dev.nodejs.teracy.dev, ~^dev\.nodejs\..*\.xip\.io
VIRTUAL_PORT: 3000
HTTPS_METHOD: noredirect # support both http and https
env_file:
- .env-common
- .env-dev
ports:
- "3000"
- "5858"
volumes:
- .:/opt/app
restart: unless-stopped
# to get this work with https://github.com/jwilder/nginx-proxy
# related: https://github.com/jwilder/nginx-proxy/issues/305
network_mode: bridge
5 changes: 5 additions & 0 deletions run-dev.sh
@@ -0,0 +1,5 @@
#!/bin/bash

yarn

yarn run dev

0 comments on commit b0a7ac4

Please sign in to comment.