about summary refs log tree commit diff
path: root/docker-compose.yml
diff options
context:
space:
mode:
Diffstat (limited to 'docker-compose.yml')
-rw-r--r--docker-compose.yml26
1 files changed, 26 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..5195255
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,26 @@
+version: "3.8"
+services:
+  server:
+    build:
+      context: .
+    container_name: shorest-server
+    ports:
+      - "127.0.0.1:${PORT}:${PORT}"
+    depends_on:
+      - postgres
+    links:
+      - postgres:postgres
+    environment:
+      - PORT
+      - POSTGRES_PASSWORD
+  postgres:
+    image: "postgres:alpine"
+    container_name: shorest-postgres
+    volumes:
+      - database:/var/lib/postgresql/data
+    environment:
+      - POSTGRES_DB=shorest
+      - POSTGRES_PASSWORD
+
+volumes:
+  database: