Skip to content

Commit d64f266

Browse files
committed
modify docker build for local development environment
* run web container from local source * publish ports to the host system * keep database state in `data/` subfolder * ignore `data/` subfolder from Dockerized database
1 parent 2c1e7ee commit d64f266

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ npm-debug.log
33
config/local.js
44
config/development.js
55
.*swp
6+
data/

docker-build.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,20 @@ services:
44
web:
55
build: .
66
expose:
7-
- "5000"
7+
- '5000'
8+
ports:
9+
- '5000:5000'
10+
volumes:
11+
- ./:/usr/src/app/
812
links:
913
- geocouch:geocouch
1014
environment:
1115
NODE_ENV: 'production'
1216
geocouch:
1317
image: almereyda/geocouch
18+
volumes:
19+
- ./data:/usr/local/var/lib/couchdb
1420
expose:
15-
- "5984"
21+
- '5984'
22+
ports:
23+
- '5984:5984'

0 commit comments

Comments
 (0)