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 **/.classpath
**/.dockerignore **/.dockerignore
**/.env
**/.git **/.git
**/.gitignore **/.gitignore
**/.project **/.project

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

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