diff --git a/Dockerfile b/Dockerfile index e69de29b..79c4cfed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:20-alpine + +WORKDIR /app + +# Copy yarn.lock and package.json to cache package installs +COPY web/package.json web/yarn.lock ./web/ + +# Install dependencies inside the container +RUN cd web && yarn install --frozen-lockfile + +# Copy the rest of the application files +COPY . . + +# Expose Vite's default dev server port +EXPOSE 5173 + +# Start the dev server listening on all host interfaces +CMD ["yarn", "--cwd", "web", "dev", "--host"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..9210b5ba --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +services: + web: + build: + context: . + dockerfile: Dockerfile + container_name: personal-security-checklist-web + ports: + - "5173:5173" + volumes: + - .:/app + - /app/web/node_modules + environment: + - NODE_ENV=development