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 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 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