mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-01-19 13:23:23 +08:00
update frontend docker build
This commit is contained in:
parent
8dd7d844ce
commit
77b68404da
@ -25,7 +25,7 @@ services:
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile.local
|
||||
dockerfile: Dockerfile.test
|
||||
container_name: frontend
|
||||
volumes:
|
||||
- ./frontend:/usr/src/app
|
||||
|
||||
1
app/frontend/.env.test
Normal file
1
app/frontend/.env.test
Normal file
@ -0,0 +1 @@
|
||||
REACT_APP_BASE_DOMAIN_NAME=localhost
|
||||
18
app/frontend/Dockerfile.test
Normal file
18
app/frontend/Dockerfile.test
Normal file
@ -0,0 +1,18 @@
|
||||
####### BUILDER IMAGE #######
|
||||
# Build stage
|
||||
FROM node:alpine
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Copy everything else, test and build
|
||||
COPY . /usr/src/app
|
||||
|
||||
# Build the app with a specific .env file
|
||||
ARG ENV_FILE=.env.test
|
||||
COPY ${ENV_FILE} /usr/src/app/.env
|
||||
|
||||
# Copy dependency files and install dependencies
|
||||
RUN npm install && npm i --save-dev @types/jest
|
||||
|
||||
EXPOSE 5173
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
Loading…
x
Reference in New Issue
Block a user