-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* create ammo.db if not exist * use database url from env * custom npm start script * update script * update README, remove comments from Dockerfile
- Loading branch information
1 parent
1b3f761
commit 9b4b3cb
Showing
10 changed files
with
431 additions
and
11 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,3 @@ | ||
.env.example | ||
.env.local | ||
Dockerfile |
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,3 +1,4 @@ | ||
NEXT_PUBLIC_BASE_PATH=/ammo | ||
NEXT_PUBLIC_IMAGE_API_PATH=http://localhost:3000 | ||
CATALOG_API_PATH=http://localhost:3000 | ||
CATALOG_API_PATH=http://localhost:3000 | ||
DATABASE_URL=file:../db/ammo.db |
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 |
---|---|---|
|
@@ -40,8 +40,5 @@ next-env.d.ts | |
# IDE | ||
/.idea | ||
|
||
# local dev files | ||
dummy-data.json | ||
|
||
# PVC k8s | ||
/db/ammo.db | ||
/db/ammo.db* |
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 |
---|---|---|
|
@@ -22,7 +22,6 @@ COPY . . | |
ENV NEXT_TELEMETRY_DISABLED=1 | ||
|
||
RUN npx prisma generate | ||
RUN npx prisma migrate deploy | ||
COPY prisma ./prisma/ | ||
|
||
RUN npm run build | ||
|
@@ -33,20 +32,25 @@ WORKDIR /app | |
ENV NODE_ENV=production | ||
ENV NEXT_TELEMETRY_DISABLED=1 | ||
|
||
RUN npm install [email protected] | ||
|
||
RUN addgroup --system --gid 1001 nodejs | ||
RUN adduser --system --uid 1001 nextjs | ||
|
||
RUN mkdir .next | ||
RUN mkdir .next && mkdir db | ||
RUN chown nextjs:nodejs .next | ||
RUN chown nextjs:nodejs db | ||
|
||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ | ||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static | ||
COPY --from=builder --chown=nextjs:nodejs /app/prisma ./prisma | ||
COPY --from=builder --chown=nextjs:nodejs /app/db ./db | ||
COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules | ||
|
||
USER nextjs | ||
|
||
EXPOSE 3000 | ||
|
||
ENV PORT=3000 | ||
|
||
|
||
CMD HOSTNAME="0.0.0.0" node server.js | ||
CMD ["npm", "run", "start:production"] |
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
Oops, something went wrong.