Initial digitCRM project structure with backend and frontend
This commit is contained in:
60
docker-compose.yml
Normal file
60
docker-compose.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# Backend API
|
||||
backend:
|
||||
image: node:18-alpine
|
||||
container_name: digitcrm-backend
|
||||
working_dir: /app
|
||||
command: >
|
||||
sh -c "
|
||||
apk add --no-cache git &&
|
||||
cd backend &&
|
||||
npm install --production &&
|
||||
npm start
|
||||
"
|
||||
ports:
|
||||
- "3001:3000"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- PORT=3000
|
||||
- DB_SERVER=cw.inex-project.net
|
||||
- DB_PORT=14333
|
||||
- DB_USER=inex
|
||||
- DB_PASSWORD=inex123!@#
|
||||
- JWT_SECRET=your-secret-key-change-in-production-12345
|
||||
- CORS_ORIGIN=http://localhost:3000,https://digitcrm.inex-project.net
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- digitcrm-network
|
||||
volumes:
|
||||
- ./backend:/app/backend
|
||||
|
||||
# Frontend SPA
|
||||
frontend:
|
||||
image: node:18-alpine
|
||||
container_name: digitcrm-frontend
|
||||
working_dir: /app
|
||||
command: >
|
||||
sh -c "
|
||||
cd frontend &&
|
||||
npm install -g pnpm &&
|
||||
pnpm install --frozen-lockfile &&
|
||||
pnpm run build &&
|
||||
pnpm run preview
|
||||
"
|
||||
ports:
|
||||
- "3000:4173"
|
||||
environment:
|
||||
- VITE_API_URL=http://localhost:3001/api
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- digitcrm-network
|
||||
depends_on:
|
||||
- backend
|
||||
volumes:
|
||||
- ./frontend:/app/frontend
|
||||
|
||||
networks:
|
||||
digitcrm-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user