48 lines
1.7 KiB
Docker
48 lines
1.7 KiB
Docker
# Use the official Node.js image as the base image
|
|
FROM node:22
|
|
|
|
# Set the working directory inside the container
|
|
WORKDIR /app
|
|
|
|
#Commentaire de fred pour faire un test3
|
|
# Set the environment variables
|
|
ENV DATABASE_URL_PROD="postgresql://apptargo:6wLAZrb0HZnd3mrmqXiArPcqLyui0o9e@10.100.0.116/app_targo_db?schema=public"
|
|
ENV DATABASE_URL_STAGING="postgresql://apptargo:6wLAZrb0HZnd3mrmqXiArPcqLyui0o9e@10.100.0.116/app_targo_db_staging?schema=public"
|
|
ENV DATABASE_URL_DEV="postgresql://apptargo:6wLAZrb0HZnd3mrmqXiArPcqLyui0o9e@10.100.0.116/app_targo_db_dev?schema=public"
|
|
|
|
ENV AUTHENTIK_ISSUER="https://auth.targo.ca/application/o/montargo/"
|
|
ENV AUTHENTIK_CLIENT_ID="KUmSmvpu2aDDy4JfNwas7XriNFtPcj2Ka2PyLO5v"
|
|
ENV AUTHENTIK_CLIENT_SECRET="N55BgX1mxT7eiY99LOo5zXr5cKz9FgTsaCA9MdC7D8ZuhOGqozvqtNXVGbpY1eCg2kkYwJeJLP89sQ8R4cYybIJI7EwKijb19bzZQpUPwBosWwG3irUwdTnZOyw8yW5i"
|
|
ENV AUTHENTIK_CALLBACK_URL="http://10.100.251.2:3420/auth/callback"
|
|
ENV AUTHENTIK_AUTH_URL="https://auth.targo.ca/application/o/authorize/"
|
|
ENV AUTHENTIK_TOKEN_URL="https://auth.targo.ca/application/o/token/"
|
|
ENV AUTHENTIK_USERINFO_URL="https://auth.targo.ca/application/o/userinfo/"
|
|
|
|
ENV TARGO_FRONTEND_URI="http://10.100.251.2/"
|
|
|
|
ENV ATTACHMENTS_SERVER_ID="server"
|
|
ENV ATTACHMENTS_ROOT=C:/
|
|
ENV MAX_UPLOAD_MB=25
|
|
ENV ALLOWED_MIME=image/jpeg,image/png,image/webp,application/pdf
|
|
|
|
# Copy package.json and package-lock.json to the working directory
|
|
COPY package*.json ./
|
|
|
|
# Install the application dependencies
|
|
RUN npm install
|
|
|
|
# Copy the rest of the application files
|
|
COPY . .
|
|
|
|
# Generate Prisma client
|
|
RUN npx prisma generate
|
|
|
|
# Build the NestJS application
|
|
RUN npm run build
|
|
|
|
# Expose the application port
|
|
EXPOSE 3000
|
|
|
|
# Command to run the application
|
|
CMD ["node", "dist/src/main"]
|