Skip to content

Commit

Permalink
Get docker working - t3
Browse files Browse the repository at this point in the history
  • Loading branch information
collinlucke committed Nov 15, 2024
1 parent 3658be9 commit f09d9e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ RUN echo "ATLAS_DB=${ATLAS_DB}" >> .env
RUN echo "ACCESS_TOKEN_SECRET=${ACCESS_TOKEN_SECRET}" >> .env
RUN echo "REFRESH_TOKEN_SECRET=${REFRESH_TOKEN_SECRET}" >> .env

COPY . .
COPY .env .

RUN npm install -g pnpm typescript
RUN pnpm install


COPY . .
COPY .env .
EXPOSE 5050
RUN pnpm run prod

Expand Down
5 changes: 5 additions & 0 deletions src/dBConnection.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { MongoClient, ServerApiVersion } from 'mongodb';
import 'dotenv/config';

console.log(process.env.ATLAS_DB_PASSWORD);
console.log(process.env.ATLAS_DB_USERNAME);
console.log(process.env.ATLAS_CLUSTER);
console.log(process.env.ATLAS_DB);

const uri = `mongodb+srv://${process.env.ATLAS_DB_USERNAME}:${process.env.ATLAS_DB_PASSWORD}@${process.env.ATLAS_CLUSTER}/?retryWrites=true&w=majority&appName=Cluster0`;

const client = new MongoClient(uri, {
Expand Down

0 comments on commit f09d9e3

Please sign in to comment.