From 43e3f8a409f67bb1bff928b21b4aedfcbe39d713 Mon Sep 17 00:00:00 2001 From: dsgnr Date: Fri, 22 Nov 2024 08:19:00 +0000 Subject: [PATCH 1/3] Remove obsolete version attribute from docker-compose --- docker-compose-dev.yml | 1 - docker-compose.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index be067cf..9fa6dd4 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -1,5 +1,4 @@ --- -version: "3.8" services: web: build: diff --git a/docker-compose.yml b/docker-compose.yml index e9f9858..1dc6cbc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,4 @@ --- -version: "3.8" services: web: image: ghcr.io/dsgnr/portcheckerio-web:latest From 32366401eae388c5f17f9dd644a854aaedce37b9 Mon Sep 17 00:00:00 2001 From: dsgnr Date: Fri, 22 Nov 2024 08:20:10 +0000 Subject: [PATCH 2/3] Fix FromAsCasing warning on docker build --- frontend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index f3d6553..47b3b07 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM node:23-alpine3.19 as builder +FROM node:23-alpine3.19 AS builder ARG DEFAULT_PORT GOOGLE_ANALYTICS ENV DEFAULT_PORT=$DEFAULT_PORT ENV GOOGLE_ANALYTICS=$GOOGLE_ANALYTICS @@ -8,7 +8,7 @@ WORKDIR /app RUN yarn install && yarn build # production environment -FROM nginx:stable-alpine-slim as web +FROM nginx:stable-alpine-slim AS web ARG DEFAULT_PORT ENV DEFAULT_PORT=$DEFAULT_PORT COPY --from=builder /app/dist /usr/share/nginx/html From 5ee7a073726f292faca21e4d0c1c31363c758517 Mon Sep 17 00:00:00 2001 From: dsgnr Date: Fri, 22 Nov 2024 08:26:34 +0000 Subject: [PATCH 3/3] Add missing yarn lock for dev, and set env --- frontend/Dockerfile.dev | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/Dockerfile.dev b/frontend/Dockerfile.dev index 1685c1a..24964b7 100644 --- a/frontend/Dockerfile.dev +++ b/frontend/Dockerfile.dev @@ -1,11 +1,12 @@ -FROM node:23-alpine3.19 +FROM node:23-alpine3.19 +ENV PATH=$PATH:$PWD/node_modules/.bin # ALlows the user to define a default port to populate the UI. # Pass a desired value in your docker run/compose environment ARG DEFAULT_PORT ENV DEFAULT_PORT=$DEFAULT_PORT -COPY web/package.json ./ +COPY web/package.json web/yarn.lock ./ RUN yarn install COPY ./web ./web WORKDIR /web