-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd09796
commit 8735530
Showing
14 changed files
with
904 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
./node_modules | ||
src/Back_end/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
version: '3.8' | ||
|
||
services: | ||
frontend: | ||
build: | ||
context: . | ||
dockerfile: dockerfile-frontend | ||
ports: | ||
- "5172:5173" # Expose frontend port 5173 | ||
environment: | ||
- NODE_ENV=development | ||
# Add other environment variables if necessary | ||
depends_on: | ||
- backend | ||
|
||
backend: | ||
build: | ||
context: . | ||
dockerfile: dockerfile-backend | ||
ports: | ||
- "3001:3001" # Expose backend port 3001 | ||
environment: | ||
- NODE_ENV=development | ||
# Add other environment variables if necessary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Use Node.js LTS version as the base image | ||
FROM node:lts-alpine | ||
|
||
# Set the working directory for the backend in the container | ||
WORKDIR /app/src/Back_end | ||
|
||
# Copy only the backend package.json and lock file initially | ||
COPY src/Back_end/package.json . | ||
COPY src/Back_end/package-lock.json . | ||
|
||
# Install all dependencies including devDependencies | ||
RUN npm install --production=false | ||
|
||
# Copy the rest of the backend application code | ||
COPY src/Back_end . | ||
|
||
# Copy backend-specific .env file (if needed) | ||
COPY src/Back_end/.env . | ||
|
||
# Expose the port on which the backend server will run | ||
EXPOSE 3000 | ||
|
||
# Command to start the backend server | ||
CMD ["npm", "run", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Use Node.js LTS version as the base image | ||
FROM node:lts-alpine | ||
|
||
# Set the working directory for the frontend in the container | ||
WORKDIR /app | ||
|
||
# Copy only the root package.json and lock file initially | ||
COPY package.json . | ||
COPY package-lock.json . | ||
|
||
# Install all dependencies including devDependencies | ||
RUN npm install --production=false | ||
|
||
# Copy the rest of the frontend application code | ||
COPY src/Front_end ./src/Front_end | ||
|
||
# Copy frontend-specific files | ||
COPY ./.env . | ||
COPY vite.config.js . | ||
COPY index.html . | ||
|
||
# Expose the port on which the frontend server will run | ||
EXPOSE 5172 | ||
|
||
# Command to start the frontend server | ||
CMD ["npm", "run", "dev"] |
Oops, something went wrong.