mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-07 00:38:51 -06:00
web: Prepare containers
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
FAST_REFRESH=false
|
||||
REACT_APP_BACKEND_URL=http://localhost:9000
|
||||
REACT_APP_BACKEND_URL=http://localhost:9000/api
|
||||
|
||||
@@ -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
5
web/frontend/Makefile
Normal 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
|
||||
Reference in New Issue
Block a user