diff --git a/.dockerignore b/.dockerignore index cbd3fdd..0d64964 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,5 @@ **/.classpath **/.dockerignore -**/.env **/.git **/.gitignore **/.project diff --git a/Dockerfile b/Dockerfile index 6529dd4..d835595 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index f8f1000..287c10b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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