-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from davitJabushanuri/hotfix/1.9.1
Hotfix/1.9.1
- Loading branch information
Showing
45 changed files
with
1,439 additions
and
4,271 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,60 @@ | ||
### STANDARD GIT IGNORE FILE ### | ||
|
||
# DEPENDENCIES | ||
node_modules/ | ||
/.pnp | ||
.pnp.js | ||
package-lock.json | ||
yarn.lock | ||
|
||
# TESTING | ||
/coverage | ||
*.lcov | ||
.nyc_output | ||
|
||
# BUILD | ||
build/ | ||
public/build/ | ||
dist/ | ||
generated/ | ||
|
||
# ENV FILES | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# LOGS | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# MISC | ||
.idea | ||
.turbo/ | ||
.cache/ | ||
.next/ | ||
.nuxt/ | ||
tmp/ | ||
temp/ | ||
.eslintcache | ||
.docusaurus | ||
|
||
# MAC | ||
._* | ||
.DS_Store | ||
Thumbs.db | ||
|
||
.turbo | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
Dockerfile | ||
.dockerignore | ||
.git |
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 |
---|---|---|
@@ -1,25 +1,37 @@ | ||
# Database configuration | ||
# Replace with your database URL. For example: postgres://user:password@localhost:5432/mydatabase | ||
DATABASE_URL="" | ||
|
||
# NextAuth configuration | ||
# Replace with your NextAuth URL. This is the URL where your application is running. For example: http://localhost:3000 | ||
NEXTAUTH_URL="" | ||
|
||
# Generate a secret for NextAuth with `openssl rand -hex 64` and replace here | ||
NEXTAUTH_SECRET="" | ||
|
||
# Google OAuth configuration | ||
# Replace with your Google Client ID and Secret. These are obtained from the Google Developer Console. | ||
GOOGLE_CLIENT_ID="" | ||
GOOGLE_CLIENT_SECRET="" | ||
|
||
# Node environment | ||
# Set to "development" for development mode or "production" for production mode | ||
NODE_ENV="development" | ||
|
||
# Vercel KV configuration | ||
KV_URL="" | ||
KV_REST_API_URL="" | ||
KV_REST_API_TOKEN="" | ||
KV_REST_API_READ_ONLY_TOKEN="" | ||
# DATABASE CONFIGURATION | ||
# The application uses a PostgreSQL database. You can obtain the database URL from your database provider. | ||
DATABASE_URL=postgres://username:password@localhost:5432/your-database | ||
|
||
# NEXTAUTH CONFIGURATION | ||
# NextAuth is used for authentication in the application. You need to specify the URL where the Next.js application is running and a secret for session cookies. | ||
|
||
NEXTAUTH_URL=http://localhost:3000 | ||
|
||
# You can generate a random secret using a tool like `uuidgen` or any other random string generator. | ||
NEXTAUTH_SECRET= | ||
|
||
# GOOGLE AUTHENTICATION CONFIGURATION | ||
# The application supports authentication with Google. You need to create a project in the Google Developers Console, enable the Google Sign-In API, and create OAuth 2.0 credentials. | ||
# More information: https://developers.google.com/identity/sign-in/web/sign-in | ||
GOOGLE_CLIENT_ID= | ||
GOOGLE_CLIENT_SECRET= | ||
|
||
# SUPABASE CONFIGURATION | ||
# The application uses Supabase for real-time updates. You need to create a project in Supabase and obtain the URL and the anonymous key. | ||
# More information: https://supabase.io/docs/guides/with-nextjs | ||
|
||
# Example: https://yourproject.supabase.co | ||
NEXT_PUBLIC_SUPABASE_URL= | ||
NEXT_PUBLIC_SUPABASE_ANON_KEY= | ||
|
||
# WEBSOCKET CONFIGURATION | ||
# The application uses a WebSocket server for real-time communication. Specify the URL of the WebSocket server. | ||
# Example: http://localhost:8080 | ||
NEXT_PUBLIC_SOCKET_URL= | ||
|
||
# UPSTASH CONFIGURATION | ||
# The application uses Upstash for rate limiting. | ||
# You need to create an account on Upstash and obtain the Redis REST URL and Token. | ||
# More information: https://upstash.com | ||
UPSTASH_REDIS_REST_URL= | ||
UPSTASH_REDIS_REST_TOKEN= |
This file was deleted.
Oops, something went wrong.
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
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,37 @@ | ||
name: Deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: {} | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: 👀 Read app name | ||
uses: SebRollen/[email protected] | ||
id: app_name | ||
with: | ||
file: "fly.toml" | ||
field: "app" | ||
|
||
- name: Setup fly | ||
uses: superfly/flyctl-actions/setup-flyctl@master | ||
|
||
- name: Deploy Staging | ||
if: ${{ github.ref == 'develop' }} | ||
run: flyctl deploy --remote-only --build-arg NEXT_PUBLIC_SOCKET_URL=${{ secrets.NEXT_PUBLIC_SOCKET_URL }} --build-arg NEXT_PUBLIC_SUPABASE_URL=${{secrets.NEXT_PUBLIC_SUPABASE_URL}} --build-arg NEXT_PUBLIC_SUPABASE_ANON_KEY=${{secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY}} --app ${{ steps.app_name.outputs.value }}-staging | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
|
||
- name: Deploy Production | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: flyctl deploy --remote-only --build-arg NEXT_PUBLIC_SOCKET_URL=${{ secrets.NEXT_PUBLIC_SOCKET_URL }} --build-arg NEXT_PUBLIC_SUPABASE_URL=${{secrets.NEXT_PUBLIC_SUPABASE_URL}} --build-arg NEXT_PUBLIC_SUPABASE_ANON_KEY=${{secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY}} | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |
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,67 @@ | ||
ARG NODE_VERSION=20.10.0 | ||
# base image | ||
FROM node:${NODE_VERSION}-slim as base | ||
|
||
# Set output property to standalone for minimal image size | ||
ENV BUILD_STANDALONE="true" | ||
|
||
# Disable telemetry | ||
ENV NEXT_TELEMETRY_DISABLED="1" | ||
|
||
# Set environment variables needed for the build process | ||
ARG NEXT_PUBLIC_SUPABASE_URL | ||
ENV NEXT_PUBLIC_SUPABASE_URL=${NEXT_PUBLIC_SUPABASE_URL} | ||
|
||
ARG NEXT_PUBLIC_SUPABASE_ANON_KEY | ||
ENV NEXT_PUBLIC_SUPABASE_ANON_KEY=${NEXT_PUBLIC_SUPABASE_ANON_KEY} | ||
|
||
ARG NEXT_PUBLIC_SOCKET_URL | ||
ENV NEXT_PUBLIC_SOCKET_URL=${NEXT_PUBLIC_SOCKET_URL} | ||
|
||
# Install openssl for Prisma | ||
RUN apt-get update && apt-get install -y openssl | ||
|
||
# Install pnpm | ||
ARG PNPM_VERSION=8.15.1 | ||
RUN npm install -g pnpm@$PNPM_VERSION | ||
|
||
# Install dependencies | ||
FROM base as deps | ||
WORKDIR /app | ||
|
||
# Install node modules | ||
COPY --link package.json pnpm-lock.yaml ./ | ||
RUN pnpm install --frozen-lockfile | ||
|
||
# Build the application | ||
FROM base as build | ||
WORKDIR /app | ||
|
||
# Copy application code | ||
COPY src/ src/ | ||
COPY public/ public/ | ||
COPY prisma/schema.prisma prisma/ | ||
COPY next.config.js postcss.config.js tailwind.config.js tsconfig.json reset.d.ts ./ | ||
|
||
COPY --from=deps /app/node_modules ./node_modules | ||
COPY --from=deps /app/package.json ./package.json | ||
COPY --from=deps /app/pnpm-lock.yaml ./pnpm-lock.yaml | ||
|
||
# Generate Prisma Client | ||
RUN npx prisma generate | ||
|
||
# Build application | ||
RUN pnpm build | ||
|
||
# Production image | ||
FROM base as prod | ||
WORKDIR /app | ||
|
||
ENV NODE_ENV="production" | ||
|
||
COPY --from=build /app/public ./public | ||
COPY --from=build /app/.next/standalone ./ | ||
COPY --from=build /app/.next/static ./.next/static | ||
|
||
EXPOSE 3000 | ||
CMD [ "node", "server.js" ] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.