aboutsummaryrefslogtreecommitdiff
path: root/docker-compose.yml
diff options
context:
space:
mode:
Diffstat (limited to 'docker-compose.yml')
-rw-r--r--docker-compose.yml22
1 files changed, 22 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..f163ecd
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,22 @@
+# Build and run which-api with database in container
+#
+# If you are getting "port already in use" error,
+# try changing exposed ports, e.g 27017:27017 -> 27018:27017
+
+version: '3'
+services:
+ app:
+ container_name: which-api
+ restart: always
+ build: .
+ environment:
+ - MONGODB_URI=mongodb://db:27017/which
+ ports:
+ - '3030:3030'
+ links:
+ - db
+ db:
+ container_name: mongo
+ image: mongo
+ ports:
+ - '27017:27017'