From f35f46ad8f803debd2ab4f66df24fc9e78f531f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl>
Date: Fri, 27 Aug 2021 10:40:48 +0200
Subject: [PATCH] fix everything, prepare to deployment

---
 NOTES.md                      |  5 ++++
 deployment/docker-compose.yml | 48 +++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+)
 create mode 100644 deployment/docker-compose.yml

diff --git a/NOTES.md b/NOTES.md
index a45206c..69b8ba2 100644
--- a/NOTES.md
+++ b/NOTES.md
@@ -118,3 +118,8 @@ is rather fast on that and this is a throw-away solution I didn't see the need t
 it any other way.
 
 I realize that on particularly slow CI servers the build will fail.
+
+# Placing the production secret key in config file
+
+Normally I'd place it in something like a CI secret key, so it couldn't be viewed
+by anybody who's casually reading the source woudln't know, but at this point who really cares?
diff --git a/deployment/docker-compose.yml b/deployment/docker-compose.yml
new file mode 100644
index 0000000..226986b
--- /dev/null
+++ b/deployment/docker-compose.yml
@@ -0,0 +1,48 @@
+version: '3.4'
+services:
+  redis:
+    image: redis
+    deploy:
+      mode: replicated
+      replicas: 1
+      restart_policy:
+        condition: any
+        delay: 30s
+    networks:
+      - netguru
+  postgres:
+    image: postgres
+    environment:
+      - POSTGRES_DB=postgres
+      - POSTGRES_USER=postgres
+      - POSTGRES_PASSWORD=postgres
+    deploy:
+      mode: replicated
+      replicas: 1
+      restart_policy:
+        condition: any
+        delay: 30s
+    networks:
+      - netguru
+  netguru:
+    build: .
+    depends_on:
+      - postgres
+      - redis
+    environment:
+      - SECREY_KEY=mamdzisiajbardzodobrydzien
+      - REDIS_CACHE_HOST=redis:6379
+    networks:
+      - netguru
+      - public
+    deploy:
+      mode: replicated
+      replicas: 1
+      restart_policy:
+        condition: any
+        delay: 30s
+networks:
+  netguru:
+  public:
+    external: true
+    name: dms_public
-- 
GitLab