From 44e0a2851d6184a5258eabd1d9b0b8fe2a004147 Mon Sep 17 00:00:00 2001 From: Tiago Yamamoto Date: Mon, 15 Dec 2025 09:44:18 -0300 Subject: [PATCH] =?UTF-8?q?feat(backoffice):=20=F0=9F=90=B3=20added=20Dock?= =?UTF-8?q?erfile=20for=20containerization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backoffice/.env.example | 14 ++++++++++++++ backoffice/Dockerfile | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 backoffice/.env.example create mode 100644 backoffice/Dockerfile diff --git a/backoffice/.env.example b/backoffice/.env.example new file mode 100644 index 0000000..40cae82 --- /dev/null +++ b/backoffice/.env.example @@ -0,0 +1,14 @@ +PORT=3001 +NODE_ENV=development + +# Stripe +STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key +STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret +STRIPE_PUBLISHABLE_KEY=pk_test_your_publishable_key + +# Database +DATABASE_URL=postgresql://user:password@localhost:5432/gohorse_backoffice + +# JWT +JWT_SECRET=your-super-secret-jwt-key +JWT_EXPIRATION=7d diff --git a/backoffice/Dockerfile b/backoffice/Dockerfile new file mode 100644 index 0000000..735d4f7 --- /dev/null +++ b/backoffice/Dockerfile @@ -0,0 +1,16 @@ +FROM node:20-alpine AS builder +WORKDIR /app +COPY package*.json ./ +RUN npm ci +COPY . . +RUN npm run build + +FROM node:20-alpine AS production +WORKDIR /app +COPY --from=builder /app/dist ./dist +COPY --from=builder /app/node_modules ./node_modules +COPY --from=builder /app/package*.json ./ +ENV NODE_ENV=production +ENV PORT=3001 +EXPOSE 3001 +CMD ["node", "dist/main.js"]