Version Final!

This commit is contained in:
Emeline Nerot 2025-04-21 09:06:27 +00:00
parent 21538b36c6
commit dc87ec9538
4 changed files with 8 additions and 12 deletions

View File

@ -3,4 +3,3 @@ DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=motdepasse
DB_NAME=tododb

View File

@ -1,24 +1,21 @@
# Use the official Node.js 16 image as the base image
FROM node:16
# Install PostgreSQL client
RUN apt-get update && apt-get install -y postgresql-client
# Use a base Node.js image
FROM node:18
# Set the working directory
WORKDIR /usr/src/app
# Copy the package.json and package-lock.json files
# Copy package.json and package-lock.json files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application code
# Copy the rest of the application files
COPY . .
# Expose the port the app runs on
EXPOSE 3000
EXPOSE 3000
# Command to run the application
# Command to start the application
CMD ["node", "server.js"]

View File

@ -20,7 +20,7 @@ spec:
- containerPort: 3000
env:
- name: DB_HOST
value: postgres-service
value: postgres-service.my-namespace.svc.cluster.local
- name: DB_PORT
value: "5432"
- name: DB_USER

View File

@ -11,4 +11,4 @@ spec:
- protocol: TCP
port: 80
targetPort: 3000
nodePort: 30080 # Tu peux changer ce port si nécessaire (entre 3000032767)
nodePort: 30080