aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-05-28 22:22:02 +0200
committerMateja Marić <mail@matejamaric.com>2021-05-28 22:32:48 +0200
commit04cb777936edffb5f16c2a4515cfa2ce88256dd7 (patch)
tree968651a69c0b297d3faf8802bbe6868bc10c25d7
parent4665abe0bd1e47fa8eb26f6f7afd2a85dbe8ee5c (diff)
downloadnode-playground-04cb777936edffb5f16c2a4515cfa2ce88256dd7.tar.gz
node-playground-04cb777936edffb5f16c2a4515cfa2ce88256dd7.zip
Added `docker-compose.yml` file.
-rw-r--r--docker-compose.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..31973e5
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,34 @@
+version: "3.8"
+
+services:
+ web:
+ build: .
+ container_name: node-playground-server
+ depends_on:
+ - db
+ networks:
+ - node-playground-network
+ ports:
+ - "3000:8080"
+ restart: always
+ env_file: .env
+ environment:
+ DB_CONN: mongodb://db/playground_db
+
+ db:
+ image: mongo:4.4
+ container_name: node-playground-db
+ volumes:
+ - node-playground-db-data:/data/db
+ networks:
+ - node-playground-network
+ expose:
+ - "27017"
+ restart: always
+
+volumes:
+ node-playground-db-data: {}
+
+networks:
+ node-playground-network:
+ driver: bridge