update docker for mono repo
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
FROM node:22.17.0-alpine
|
||||
|
||||
WORKDIR /var/www/html/
|
||||
|
||||
CMD npm install && npm run dev -- --host 0.0.0.0
|
||||
@@ -1,6 +0,0 @@
|
||||
VITE_API_TARGET=http://localhost:8080/
|
||||
|
||||
# Base path the client calls. Leave as /api to use the dev proxy (same-origin,
|
||||
# no CORS). For a production build served on a different origin than the API,
|
||||
# set this to the API's absolute URL, e.g. https://radapi.example.com
|
||||
VITE_API_BASE=/api
|
||||
@@ -1,12 +0,0 @@
|
||||
FROM node:22.17.0-alpine AS frontendbuilder
|
||||
|
||||
ARG VITE_API_TARGET
|
||||
|
||||
WORKDIR /var/www/html
|
||||
COPY . .
|
||||
RUN echo VITE_API_TARGET=$VITE_API_TARGET > .env \
|
||||
&& npm ci && npm run build
|
||||
|
||||
FROM nginx
|
||||
|
||||
COPY --from=frontendbuilder /var/www/html/dist /usr/share/nginx/html
|
||||
@@ -1,16 +0,0 @@
|
||||
|
||||
## Production deployment
|
||||
it is assumed that you will be using backend on the same machine, so this compose is for both services
|
||||
```yml
|
||||
services:
|
||||
frontend:
|
||||
hostname: frontend
|
||||
image: git.shihaam.dev/sarlink/radui
|
||||
ports:
|
||||
- 8000:80
|
||||
backend:
|
||||
hostname: backend
|
||||
image: git.shihaam.dev/sarlink/radapi
|
||||
ports:
|
||||
- 8001:80
|
||||
```
|
||||
@@ -1,9 +0,0 @@
|
||||
services:
|
||||
frontend:
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: .build/prod/Dockerfile
|
||||
args:
|
||||
VITE_API_TARGET: ${VITE_API_TARGET}
|
||||
hostname: frontend
|
||||
image: git.shihaam.dev/sarlink/radui
|
||||
@@ -1,8 +0,0 @@
|
||||
services:
|
||||
frontend:
|
||||
build:
|
||||
context: .build/dev
|
||||
volumes:
|
||||
- ./:/var/www/html/
|
||||
ports:
|
||||
- 5173:5173
|
||||
Reference in New Issue
Block a user