Skip to content

Commit

Permalink
fix: update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
dillionverma committed Mar 18, 2024
1 parent 3db8745 commit 2526040
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
19 changes: 18 additions & 1 deletion dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
FROM node:20-alpine

ARG DATABASE_URL
ARG NEXTAUTH_SECRET
ARG NEXTAUTH_URL
ARG NEXT_PUBLIC_APP_URL
ARG RESEND_API_KEY
ARG STRIPE_API_KEY
ARG NEXT_PUBLIC_STRIPE_PAYMENT_LINK
ARG NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY_LIVE
ARG NODE_ENV
ARG SERVER_URL
ARG STRIPE_SECRET_KEY_LIVE
ARG STRIPE_WEBHOOK_SECRET

WORKDIR /app

# Install dependencies based on the preferred package manager
Expand All @@ -12,11 +25,15 @@ RUN \
else echo "Warning: Lockfile not found. It is recommended to commit lockfiles to version control." && yarn install; \
fi

COPY src ./src
COPY . .
COPY public ./public
COPY next.config.js .
COPY tsconfig.json .

RUN npx prisma generate
RUN npx prisma db push


# Next.js collects completely anonymous telemetry data about general usage. Learn more here: https://nextjs.org/telemetry
# Uncomment the following line to disable telemetry at run time
# ENV NEXT_TELEMETRY_DISABLED 1
Expand Down
8 changes: 1 addition & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
- ./src:/app/src
- ./public:/app/public
ports:
- "3000:3000"
- "3000:3003"
environment:
- DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres
env_file:
Expand All @@ -37,12 +37,6 @@ services:
- .env.local
ports:
- "5432:5432"
networks:
- my_network

volumes:
database_data:

networks:
my_network:
external: true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "next dev -p 3003",
"dev": "next dev",
"prebuild": "npm run prisma generate",
"build": "next build",
"start": "next start",
Expand Down

0 comments on commit 2526040

Please sign in to comment.