mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-02-07 15:53:45 +08:00
Merge pull request #53 from aimingmed/feature/backend-frontend-structure
update frontend docker build
This commit is contained in:
commit
91cab4333c
@ -25,7 +25,7 @@ services:
|
|||||||
frontend:
|
frontend:
|
||||||
build:
|
build:
|
||||||
context: ./frontend
|
context: ./frontend
|
||||||
dockerfile: Dockerfile.local
|
dockerfile: Dockerfile.test
|
||||||
container_name: frontend
|
container_name: frontend
|
||||||
volumes:
|
volumes:
|
||||||
- ./frontend:/usr/src/app
|
- ./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