From 46be169fd3c79ee985c94ef7f6445fbf32d70b8f Mon Sep 17 00:00:00 2001 From: Morten Brekkevold Date: Thu, 15 Feb 2024 15:24:23 +0100 Subject: [PATCH] Remove obsolete frontend build definition We use an official image now. --- frontend/Dockerfile | 29 ----------------------------- frontend/Dockerfile-build | 21 --------------------- frontend/docker-entrypoint.sh | 6 ------ frontend/nginx.conf | 9 --------- 4 files changed, 65 deletions(-) delete mode 100644 frontend/Dockerfile delete mode 100644 frontend/Dockerfile-build delete mode 100755 frontend/docker-entrypoint.sh delete mode 100644 frontend/nginx.conf diff --git a/frontend/Dockerfile b/frontend/Dockerfile deleted file mode 100644 index ef6a28a..0000000 --- a/frontend/Dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -ARG VERSION=1.6.1 -FROM ghcr.io/uninett/argus-frontend:${VERSION} AS build - -# These arguments are needed in the environment to properly configure and build -# Argus-frontend for this site: -ARG REACT_APP_BACKEND_URL=http://argus.example.org -ARG REACT_APP_ENABLE_WEBSOCKETS_SUPPORT=true -ARG REACT_APP_BACKEND_WS_URL=wss://argus.example.org/ws -ARG REACT_APP_USE_SECURE_COOKIE=true -ARG REACT_APP_DEBUG=true -ARG REACT_APP_DEFAULT_AUTO_REFRESH_INTERVAL=30 -ARG REACT_APP_REALTIME_SERVICE_MAX_RETRIES=5 -ARG REACT_APP_COOKIE_DOMAIN=argus.example.org - -RUN npm run build - -########################################################## -# production environment consisting only of nginx and the statically compiled -# Argus Frontend application files -# FROM: https://mherman.org/blog/dockerizing-a-react-app/ -FROM nginx:stable-alpine - -COPY --from=build /app/build /usr/share/nginx/html - -RUN apk add --update tini tree -COPY nginx.conf /etc/nginx/conf.d/default.conf - -ENTRYPOINT ["/sbin/tini", "-v", "--"] -CMD ["nginx", "-g", "daemon off;"] diff --git a/frontend/Dockerfile-build b/frontend/Dockerfile-build deleted file mode 100644 index cf18fb2..0000000 --- a/frontend/Dockerfile-build +++ /dev/null @@ -1,21 +0,0 @@ -# This image installs all dependencies and pre-builds an Argus Frontend -# version, in the hopes that a rebuild for production will be faster. -FROM node:16-bullseye -WORKDIR /app - -RUN apt-get update && apt-get install -y --no-install-recommends tini git - - -ARG GITREF=master -ARG REPO=https://github.com/Uninett/argus-frontend.git -RUN git clone -b ${GITREF} ${REPO} /app - -RUN npm ci -RUN npx browserslist@latest --update-db - -RUN npm run build - -ONBUILD RUN npm run build - -# When used as an intermediate builder image, the complete set of statically -# built files to serve from the web server root can be copied from /app/build diff --git a/frontend/docker-entrypoint.sh b/frontend/docker-entrypoint.sh deleted file mode 100755 index 4aa030c..0000000 --- a/frontend/docker-entrypoint.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -x -echo "STARTING STUFF!" -export HTTPS=false -export PORT=8080 -npm run node server.js -echo "SHADDUP with code $?" diff --git a/frontend/nginx.conf b/frontend/nginx.conf deleted file mode 100644 index 24c0801..0000000 --- a/frontend/nginx.conf +++ /dev/null @@ -1,9 +0,0 @@ -server { - listen 8080; - - location / { - root /usr/share/nginx/html; - index index.html index.htm; - try_files $uri $uri/ /index.html; - } -}