UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Verified Commit f68a4be3 authored by Patrick Tafoya's avatar Patrick Tafoya
Browse files

BULL-3225-better-startup - minor adjustments

parent 0ad928d3
No related branches found
No related tags found
1 merge request!11BULL-3225-better-startup
......@@ -5,11 +5,13 @@ WORKDIR /app
USER node
#set up dependencies
COPY --chown=node:node ./xx_project_name_xx-api/package.json ./
# Copy only package files to leverage Docker caching
COPY --chown=node:node ./xx_project_name_xx-api/package*.json ./
# install dependencies
# TODO: It would be best to ensure npm install has been run before creating the image for the first time, then the if check can be removed
RUN if test -f package-lock.json ; then npm ci ; else npm i ; fi
EXPOSE 8000
# Default command (can be overridden by docker-compose)
CMD ["npm", "run", "dev"]
FROM node:20.11
# Create and set ownership for /home/node
RUN mkdir -p /home/node && chown node:node /home/node
WORKDIR /home/node
# Set the working directory
RUN mkdir -p /app && chown node:node /app
WORKDIR /app
USER node
# set up dependencies
COPY --chown=node:node ./xx_project_name_xx-ui/package.json ./
# Copy only package files to leverage Docker caching
COPY --chown=node:node ./xx_project_name_xx-ui/package*.json ./
# install dependencies
# TODO: It would be best to ensure npm install has been run before creating the image for the first time, then the if check can be removed
RUN if test -f package-lock.json ; then npm ci ; else npm i ; fi
EXPOSE 8080
......
......@@ -7,8 +7,8 @@ services:
container_name: xx_project_name_xx-ui
user: "${UID:-1000}:${GID:-1000}" # Default to 1000:1000 if UID/GID not set
volumes:
- ./xx_project_name_xx-ui:/home/node
- /home/node/node_modules
- ./xx_project_name_xx-ui:/app
- /app/node_modules
command: npx vite --host
environment:
# container internal port (not exposed to host)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment