From 37c8f17fc781ab4ada4a966cdf79f0841cc1a764 Mon Sep 17 00:00:00 2001 From: FabiKogWi Date: Tue, 25 Jun 2024 18:37:18 +0200 Subject: [PATCH 1/4] Very simple dockerfile to run the server from --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c1114ba --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM node:21-alpine3.19 +RUN mkdir /home/hisv +WORKDIR /home/hisv +COPY yarn.lock package.json ./ +RUN yarn install +COPY . /home/hisv/ +EXPOSE 5173 +CMD ["yarn", "dev", "--host", "0.0.0.0"] From 5051e8a712ac110a6caa4d03f5a041267a5543ac Mon Sep 17 00:00:00 2001 From: FabiKogWi Date: Wed, 26 Jun 2024 14:24:23 +0200 Subject: [PATCH 2/4] Changed CMD to yarn start and changed ports --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c1114ba..c3cc02c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,6 @@ WORKDIR /home/hisv COPY yarn.lock package.json ./ RUN yarn install COPY . /home/hisv/ -EXPOSE 5173 -CMD ["yarn", "dev", "--host", "0.0.0.0"] +EXPOSE 3000 +RUN yarn build +CMD ["yarn", "start", "--host", "0.0.0.0"] From 11d2722e7da063dfbf62c4ba6ff572d3c7a1e625 Mon Sep 17 00:00:00 2001 From: FabiKogWi Date: Thu, 27 Jun 2024 12:18:48 +0200 Subject: [PATCH 3/4] Created docker-compose.yml to load splats easier into docker container --- docker-compose.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1ce478c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3' +services: + app: + image: fabiuni/teamprojekt + volumes: + - ./public:home/hisv/public From 35aaedec461219e8db726e33e03eff75cef10322 Mon Sep 17 00:00:00 2001 From: FabiKogWi Date: Thu, 27 Jun 2024 13:12:44 +0200 Subject: [PATCH 4/4] Added port mapping to make the splat viewable --- docker-compose.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1ce478c..23c22ad 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,8 @@ version: '3' services: - app: + hisv: image: fabiuni/teamprojekt + ports: + - "3000:3000" volumes: - - ./public:home/hisv/public + - ./public:/home/hisv/public