aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-10-27 15:42:10 +0300
committereug-vs <eug-vs@keemail.me>2020-10-27 15:42:10 +0300
commitce673531b12d082350a4996f4ed54a84ac007e3c (patch)
treed5ffb0deafedef8dd67828864f9a0e60575f2e35
parentafd2f44d3fd814953ff850ac3c5aec1acd9d8da1 (diff)
downloadwhich-api-ce673531b12d082350a4996f4ed54a84ac007e3c.tar.gz
build: add docker configs
-rw-r--r--.dockerignore1
-rw-r--r--Dockerfile13
-rw-r--r--docker-compose.yml13
3 files changed, 27 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1 @@
+node_modules
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..bcb00cc
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,13 @@
+FROM node:12
+
+WORKDIR /app
+
+COPY package*.json ./
+
+RUN npm install
+
+COPY . .
+
+EXPOSE 3030
+
+CMD ["npm", "start"]
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..392d48a
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,13 @@
+version: '3'
+services:
+ app:
+ container_name: which-api
+ restart: always
+ build: .
+ ports:
+ - '3030:3030'
+ links:
+ - db
+ db:
+ container_name: mongo
+ image: mongo