-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathDockerfile
84 lines (71 loc) · 2.67 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Use the official Node.js image as the base image
FROM node:18.18.2
# Set the working directory in the container
WORKDIR /app
# Copy package.json and package-lock.json to the working directory
COPY package*.json ./
# Install dependencies
RUN npm install --legacy-peer-deps
# Set up database schema
# RUN npx prisma db push
# Copy the entire application to the working directory
COPY . .
# Expose the port on which your Next.js app will run
EXPOSE 4002
# Set the DATABASE_URL environment variable
# ENV DATABASE_URL="postgresql://platform:7emp1eAppe4rance5Rang3I5BNOffice@db.unicis.tech/unicis_platform?schema=platform"
# DEV DB -> ENV DATABASE_URL=postgresql://unicis_platform_dev:7emp1eAppe4rance5Rang3I5BNOffice-dev@srv-captain--db-dev:5432/unicis_platform_dev?sslmode=prefer
ARG NEXTAUTH_URL=${NEXTAUTH_URL}
ENV NEXTAUTH_URL=${NEXTAUTH_URL}
ARG NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
ENV NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
ARG SMTP_HOST=${SMTP_HOST}
ENV SMTP_HOST=${SMTP_HOST}
ARG SMTP_PORT=${SMTP_PORT}
ENV SMTP_PORT=${SMTP_PORT}
ARG SMTP_USER=${SMTP_USER}
ENV SMTP_USER=${SMTP_USER}
ARG SMTP_PASSWORD=${SMTP_PASSWORD}
ENV SMTP_PASSWORD=${SMTP_PASSWORD}
ARG SMTP_FROM=${SMTP_FROM}
ENV SMTP_FROM=${SMTP_FROM}
ARG BILLING_EMAIL=${BILLING_EMAIL}
ENV BILLING_EMAIL=${BILLING_EMAIL}
ARG DATABASE_URL=${DATABASE_URL}
ENV DATABASE_URL=${DATABASE_URL}
ARG APP_URL=${APP_URL}
ENV APP_URL=${APP_URL}
ARG SVIX_URL=${SVIX_URL}
ENV SVIX_URL=${SVIX_URL}
ARG SVIX_API_KEY=${SVIX_API_KEY}
ENV SVIX_API_KEY=${SVIX_API_KEY}
# Users will need to confirm their email before accessing the app feature
ARG CONFIRM_EMAIL=${CONFIRM_EMAIL}
ENV CONFIRM_EMAIL=${CONFIRM_EMAIL}
# Matamo
ARG NEXT_PUBLIC_MATOMO_URL=${NEXT_PUBLIC_MATOMO_URL}
ENV NEXT_PUBLIC_MATOMO_URL=${NEXT_PUBLIC_MATOMO_URL}
ARG NEXT_PUBLIC_MATOMO_SITE_ID=${NEXT_PUBLIC_MATOMO_SITE_ID}
ENV NEXT_PUBLIC_MATOMO_SITE_ID=${NEXT_PUBLIC_MATOMO_SITE_ID}
# AuditLogs
ARG RETRACED_URL=${RETRACED_URL}
ENV RETRACED_URL=${RETRACED_URL}
ARG RETRACED_API_KEY=${RETRACED_API_KEY}
ENV RETRACED_API_KEY=${RETRACED_API_KEY}
ARG RETRACED_PROJECT_ID=${RETRACED_PROJECT_ID}
ENV RETRACED_PROJECT_ID=${RETRACED_PROJECT_ID}
# Team feature
ARG FEATURE_TEAM_SSO=${FEATURE_TEAM_SSO}
ENV FEATURE_TEAM_SSOL=${FEATURE_TEAM_SSO}
ARG FEATURE_TEAM_DSYNCL=${FEATURE_TEAM_DSYNC}
ENV FEATURE_TEAM_DSYNC=${FEATURE_TEAM_DSYNC}
ARG FEATURE_TEAM_AUDIT_LOG=${FEATURE_TEAM_AUDIT_LOG}
ENV FEATURE_TEAM_AUDIT_LOG=${FEATURE_TEAM_AUDIT_LOG}
ARG FEATURE_TEAM_WEBHOOK=${FEATURE_TEAM_WEBHOOK}
ENV FEATURE_TEAM_WEBHOOK=${FEATURE_TEAM_WEBHOOK}
ARG FEATURE_TEAM_API_KEY=${FEATURE_TEAM_API_KEY}
ENV FEATURE_TEAM_API_KEY=${FEATURE_TEAM_API_KEY}
# Build the Next.js app
RUN npm run build
# Start the Next.js app
CMD ["npm", "start"]