Fix docker issues

This commit is contained in:
Lee 2022-11-17 06:47:14 +00:00
parent e59d2ef537
commit d9f1603081
No known key found for this signature in database
GPG Key ID: 6EA25896ECCB3121
3 changed files with 9 additions and 5 deletions

@ -1,6 +1,5 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project

@ -23,8 +23,9 @@ COPY . .
# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry during the build.
# ENV NEXT_TELEMETRY_DISABLED 1
ENV NEXT_TELEMETRY_DISABLED 1
COPY .env .env
RUN yarn build
# If using npm comment out above and use below instead
@ -36,7 +37,7 @@ WORKDIR /app
ENV NODE_ENV production
# Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED 1
ENV NEXT_TELEMETRY_DISABLED 1
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

@ -12,7 +12,8 @@ services:
env_file:
- .env
ports:
- 3000:3000
- 7769:3000
user: root
volumes:
- ./.storage:/app/.storage
@ -22,5 +23,8 @@ services:
environment:
MONGO_INITDB_ROOT_USERNAME: imageify
MONGO_INITDB_ROOT_PASSWORD: reallysecuremongopassword
ports:
- 27017:27017
user: root
volumes:
- ./mongodb:/data
- ./mongodb:/data/db