Some hard coding at least for now
This commit is contained in:
@@ -47,6 +47,8 @@ COPY --from=builder /app/public ./public
|
|||||||
COPY --from=builder --chown=1001:1001 /app/.next/standalone ./
|
COPY --from=builder --chown=1001:1001 /app/.next/standalone ./
|
||||||
COPY --from=builder --chown=1001:1001 /app/.next/static ./.next/static
|
COPY --from=builder --chown=1001:1001 /app/.next/static ./.next/static
|
||||||
|
|
||||||
|
ENV MONGODB_URI "mongodb+srv://user:JKpFBymv0WLv3STj@encoach.lz18a.mongodb.net/?retryWrites=true&w=majority&appName=EnCoach"
|
||||||
|
|
||||||
USER nextjs
|
USER nextjs
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import {MongoClient} from "mongodb";
|
import {MongoClient} from "mongodb";
|
||||||
|
|
||||||
|
if (!process.env.MONGODB_URI) {
|
||||||
|
throw new Error('Invalid/Missing environment variable: "MONGODB_URI"');
|
||||||
|
}
|
||||||
|
|
||||||
const uri = process.env.MONGODB_URI || "";
|
const uri = process.env.MONGODB_URI || "";
|
||||||
const options = {};
|
const options = {};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user