From 98112b33e20820f90060989ff24c1466311b2386 Mon Sep 17 00:00:00 2001
From: raphaesl <raphaesl@stud.ntnu.no>
Date: Sat, 25 Mar 2023 17:31:12 +0100
Subject: [PATCH] Created automatic update of config files for bookface

---
 configuration/worker/docker-compose.yml | 61 +++++++++++++++++++++++++
 1 file changed, 61 insertions(+)
 create mode 100644 configuration/worker/docker-compose.yml

diff --git a/configuration/worker/docker-compose.yml b/configuration/worker/docker-compose.yml
new file mode 100644
index 0000000..6e2ccfe
--- /dev/null
+++ b/configuration/worker/docker-compose.yml
@@ -0,0 +1,61 @@
+version: '3.3'
+
+configs:
+  bf_config:
+    file: ./config.php.swarm
+
+  haproxy_config:
+    file: ./haproxy.cfg
+
+networks:
+  bf:
+    attachable: true
+
+services:
+  web:
+    image: 192.168.128.23:5000/bf:v17
+
+    configs:
+      - source: bf_config
+        target: /var/www/html/config.php
+    ports:
+      - "80:80"
+    networks:
+        - bf
+    volumes:
+        - type: bind
+          source: /bf_images
+          target: /var/www/html/images
+
+    environment:
+      BF_MEMCACHE_SERVER: memcache
+      BF_DB_HOST: db_balance
+      BF_DB_PORT: 26257
+      BF_DB_USER: bfuser
+      BF_DB_NAME: bf
+      BF_FRONTPAGE_LIMIT: 500
+
+    deploy:
+      replicas: 3
+
+  memcache:
+    image: 192.168.128.23:5000/memcached
+    restart: always
+
+    networks:
+      - bf
+
+  db_balance:
+    image: 192.168.128.23:5000/haproxy
+
+    restart: always
+
+    configs:
+      - source: haproxy_config
+        target: /usr/local/etc/haproxy/haproxy.cfg
+
+    networks:
+      - bf
+
+    ports:
+      - "1936:1936"
\ No newline at end of file
-- 
GitLab