Skip to content

Commit

Permalink
Merge pull request #7 from drawn-app/feature/dockerfile
Browse files Browse the repository at this point in the history
Deploying config
  • Loading branch information
jutatuch authored Nov 2, 2024
2 parents dea4186 + 5f6f91e commit cc07690
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Dockerfile
node_modules
npm-debug.log
dist
# .env
.env
.env.example
.gitignore
*.md
Expand Down
18 changes: 16 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM oven/bun AS build
FROM oven/bun:1-alpine AS build

WORKDIR /app

Expand All @@ -23,13 +23,27 @@ RUN bun build \
--outfile server \
./src/index.ts

FROM debian:bullseye AS prod
FROM node:23-bullseye AS prod

WORKDIR /app

COPY --from=build /app/server /app/server
COPY --from=build /app/node_modules/.prisma/client /app/node_modules/.prisma/client
COPY --from=build /app/prisma/schema.prisma /app/prisma/schema.prisma

RUN npm install prisma --save-dev

CMD ["/app/server"]

EXPOSE 3000

# FROM debian:bullseye AS prod

# WORKDIR /app

# COPY --from=build /app/server /app/server
# COPY --from=build /app/node_modules/.prisma/client /app/node_modules/.prisma/client

# CMD ["/app/server"]

# EXPOSE 3000
4 changes: 2 additions & 2 deletions src/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ export default class AuthService {
const mailMessage: MailMessage = {
to: user.email,
subject: "Welcome to Drawn!",
body: "Welcome to Drawn, the best collaborative app in the world. HOHOHOHOHOHOHOHOHO",
body: "Welcome to Drawn, the drawing collaborative app. We are excited to have you on board!",
}

amqp.connect(
"amqp://localhost",
process.env.RABBITMQ_URL || "amqp://localhost",
function (error0: Error | null, connection: Connection) {
if (error0) {
throw error0;
Expand Down

0 comments on commit cc07690

Please sign in to comment.