Skip to content

Commit

Permalink
add .env to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-moha committed Oct 23, 2024
1 parent dc40a28 commit 6795da8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 33 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ jobs:
NEXT_PUBLIC_TEXT_DIRECTION: ${{ env.NEXT_PUBLIC_TEXT_DIRECTION}}
NEXT_PUBLIC_USE_EXAMPLE_MESSAGES: ${{ env.NEXT_PUBLIC_USE_EXAMPLE_MESSAGES}}
NEXT_PUBLIC_USE_FOOTER_CLIENT_TEXT: ${{ env.NEXT_PUBLIC_USE_FOOTER_CLIENT_TEXT}}
SITE_URL: ${{ env.SITE_URL}}
69 changes: 36 additions & 33 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,53 +1,56 @@
# Use Node.js 20 as the base image
FROM node:20-alpine AS base

ARG OPENAI_API_KEY
ENV OPENAI_API_KEY=$OPENAI_API_KEY
# ARG OPENAI_API_KEY
# ENV OPENAI_API_KEY=$OPENAI_API_KEY

ARG NEXT_PUBLIC_SUPABASE_ANON_KEY
ENV NEXT_PUBLIC_SUPABASE_ANON_KEY=$NEXT_PUBLIC_SUPABASE_ANON_KEY
# ARG NEXT_PUBLIC_SUPABASE_ANON_KEY
# ENV NEXT_PUBLIC_SUPABASE_ANON_KEY=$NEXT_PUBLIC_SUPABASE_ANON_KEY

ARG NEXT_PUBLIC_SUPABASE_BUCKET_NAME
ENV NEXT_PUBLIC_SUPABASE_BUCKET_NAME=$NEXT_PUBLIC_SUPABASE_BUCKET_NAME
# ARG NEXT_PUBLIC_SUPABASE_BUCKET_NAME
# ENV NEXT_PUBLIC_SUPABASE_BUCKET_NAME=$NEXT_PUBLIC_SUPABASE_BUCKET_NAME

ARG NEXT_PUBLIC_SUPABASE_SCHEMA
ENV NEXT_PUBLIC_SUPABASE_SCHEMA=$NEXT_PUBLIC_SUPABASE_SCHEMA
# ARG NEXT_PUBLIC_SUPABASE_SCHEMA
# ENV NEXT_PUBLIC_SUPABASE_SCHEMA=$NEXT_PUBLIC_SUPABASE_SCHEMA

ARG NEXT_PUBLIC_SUPABASE_URL
ENV NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL
# ARG NEXT_PUBLIC_SUPABASE_URL
# ENV NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL

ARG NEXT_SUPABASE_SERVICE_ROLE_KEY
ENV NEXT_SUPABASE_SERVICE_ROLE_KEY=$NEXT_SUPABASE_SERVICE_ROLE_KEY
# ARG NEXT_SUPABASE_SERVICE_ROLE_KEY
# ENV NEXT_SUPABASE_SERVICE_ROLE_KEY=$NEXT_SUPABASE_SERVICE_ROLE_KEY

ARG OPENAI_ASSISTANT_ID
ENV OPENAI_ASSISTANT_ID=$OPENAI_ASSISTANT_ID
# ARG OPENAI_ASSISTANT_ID
# ENV OPENAI_ASSISTANT_ID=$OPENAI_ASSISTANT_ID

ARG NEXT_PUBLIC_BIZGPT_FRONTEND_LANGUAGE
ENV NEXT_PUBLIC_BIZGPT_FRONTEND_LANGUAGE=$NEXT_PUBLIC_BIZGPT_FRONTEND_LANGUAGE
# ARG NEXT_PUBLIC_BIZGPT_FRONTEND_LANGUAGE
# ENV NEXT_PUBLIC_BIZGPT_FRONTEND_LANGUAGE=$NEXT_PUBLIC_BIZGPT_FRONTEND_LANGUAGE

ARG NEXT_PUBLIC_CLIENT_BRANDING_NAME
ENV NEXT_PUBLIC_CLIENT_BRANDING_NAME=$NEXT_PUBLIC_CLIENT_BRANDING_NAME
# ARG NEXT_PUBLIC_CLIENT_BRANDING_NAME
# ENV NEXT_PUBLIC_CLIENT_BRANDING_NAME=$NEXT_PUBLIC_CLIENT_BRANDING_NAME

ARG NEXT_PUBLIC_EMPTY_TEXT_BODY
ENV NEXT_PUBLIC_EMPTY_TEXT_BODY=$NEXT_PUBLIC_EMPTY_TEXT_BODY
# ARG NEXT_PUBLIC_EMPTY_TEXT_BODY
# ENV NEXT_PUBLIC_EMPTY_TEXT_BODY=$NEXT_PUBLIC_EMPTY_TEXT_BODY

ARG NEXT_PUBLIC_EMPTY_TEXT_HEADER
ENV NEXT_PUBLIC_EMPTY_TEXT_HEADER=$NEXT_PUBLIC_EMPTY_TEXT_HEADER
# ARG NEXT_PUBLIC_EMPTY_TEXT_HEADER
# ENV NEXT_PUBLIC_EMPTY_TEXT_HEADER=$NEXT_PUBLIC_EMPTY_TEXT_HEADER

ARG NEXT_PUBLIC_FOOTER_CLIENT_TEXT
ENV NEXT_PUBLIC_FOOTER_CLIENT_TEXT=$NEXT_PUBLIC_FOOTER_CLIENT_TEXT
# ARG NEXT_PUBLIC_FOOTER_CLIENT_TEXT
# ENV NEXT_PUBLIC_FOOTER_CLIENT_TEXT=$NEXT_PUBLIC_FOOTER_CLIENT_TEXT

ARG NEXT_PUBLIC_OUTLINE_ADDRESS
ENV NEXT_PUBLIC_OUTLINE_ADDRESS=$NEXT_PUBLIC_OUTLINE_ADDRESS
# ARG NEXT_PUBLIC_OUTLINE_ADDRESS
# ENV NEXT_PUBLIC_OUTLINE_ADDRESS=$NEXT_PUBLIC_OUTLINE_ADDRESS

ARG NEXT_PUBLIC_TEXT_DIRECTION
ENV NEXT_PUBLIC_TEXT_DIRECTION=$NEXT_PUBLIC_TEXT_DIRECTION
# ARG NEXT_PUBLIC_TEXT_DIRECTION
# ENV NEXT_PUBLIC_TEXT_DIRECTION=$NEXT_PUBLIC_TEXT_DIRECTION

ARG NEXT_PUBLIC_USE_EXAMPLE_MESSAGES
ENV NEXT_PUBLIC_USE_EXAMPLE_MESSAGES=$NEXT_PUBLIC_USE_EXAMPLE_MESSAGES
# ARG NEXT_PUBLIC_USE_EXAMPLE_MESSAGES
# ENV NEXT_PUBLIC_USE_EXAMPLE_MESSAGES=$NEXT_PUBLIC_USE_EXAMPLE_MESSAGES

ARG NEXT_PUBLIC_USE_FOOTER_CLIENT_TEXT
ENV NEXT_PUBLIC_USE_FOOTER_CLIENT_TEXT=$NEXT_PUBLIC_USE_FOOTER_CLIENT_TEXT
# ARG NEXT_PUBLIC_USE_FOOTER_CLIENT_TEXT
# ENV NEXT_PUBLIC_USE_FOOTER_CLIENT_TEXT=$NEXT_PUBLIC_USE_FOOTER_CLIENT_TEXT

ARG SITE_URL
ENV SITE_URL=$SITE_URL

# Install pnpm
RUN npm install -g pnpm
Expand All @@ -65,7 +68,7 @@ RUN if [ -f pnpm-lock.yaml ]; then pnpm install --frozen-lockfile; \

# Copy the rest of the application code
COPY . .

COPY .env .env
# Build the Next.js app
RUN pnpm build

Expand Down

0 comments on commit 6795da8

Please sign in to comment.