From 858ec489badd87e8c5377819a398a1aa2ca21822 Mon Sep 17 00:00:00 2001
From: M9713 <m9713@student.jamk.fi>
Date: Wed, 30 Mar 2022 12:11:28 +0300
Subject: [PATCH] Update Dockerfile

---
 conduit-front/Dockerfile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/conduit-front/Dockerfile b/conduit-front/Dockerfile
index e3f9417..e15e4b4 100644
--- a/conduit-front/Dockerfile
+++ b/conduit-front/Dockerfile
@@ -6,12 +6,12 @@ WORKDIR /usr/src/app
 
 # Install app dependecies
 COPY package*.json ./
-COPY public_ip.sh ./
-RUN bash public_ip.sh
 RUN npm install
 
 # Bundle app source
 COPY . .
 
 EXPOSE 4100
-CMD [ "npm", "start" ]
+
+CMD IP=$(curl https://api.ipify.org) && sed -i "s/localhost/$IP/g" src/agent.js && npm start
+# CMD [ "npm", "start" ]
-- 
GitLab