web: Prepare containers

This commit is contained in:
2025-11-11 14:46:16 -06:00
parent 18ab2c40ba
commit 4c34931b34
8 changed files with 64 additions and 14 deletions

View File

@@ -1,2 +1,2 @@
FAST_REFRESH=false
REACT_APP_BACKEND_URL=http://localhost:9000
REACT_APP_BACKEND_URL=http://localhost:9000/api

View File

@@ -1,13 +1,6 @@
# Build Stage
FROM node:18-alpine AS build
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Production Stage
FROM nginx:stable-alpine AS production
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
CMD ["npm", "start"]

5
web/frontend/Makefile Normal file
View File

@@ -0,0 +1,5 @@
docker-build:
docker build . -t ucjl-frontend
docker-run:
docker run -e REACT_APP_BACKEND_URL=http://localhost:9000/api --publish 3000:3000 --rm -it ucjl-frontend