feat(backoffice): 🐳 added Dockerfile for containerization
This commit is contained in:
parent
1d4754af4f
commit
44e0a2851d
2 changed files with 30 additions and 0 deletions
14
backoffice/.env.example
Normal file
14
backoffice/.env.example
Normal file
|
|
@ -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
|
||||
16
backoffice/Dockerfile
Normal file
16
backoffice/Dockerfile
Normal file
|
|
@ -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"]
|
||||
Loading…
Reference in a new issue