Skip to content

Commit

Permalink
Added backend-server
Browse files Browse the repository at this point in the history
  • Loading branch information
anoopkarnik committed Jul 7, 2024
1 parent 3d6dfe8 commit 1115c4c
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docker-compose-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ services:
- .env.dashboard-app
volumes:
- /home/ubuntu/logs/dashboard-app:/app/apps/dashboard-app/logs

backend-server:
image: anoopkarnik/backend-server:latest
restart: always
ports:
- "4001:40011"
networks:
- turborepo-network
env_file:
- .env.backend-server
volumes:
- /home/ubuntu/logs/backend-server:/app/apps/backend-server/logs

networks:
turborepo-network:
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ services:
networks:
- turborepo-network

backend-server:
build:
context: .
dockerfile: ./docker/Dockerfile.backend-server
image: anoopkarnik/backend-server:latest
ports:
- "4001:40011"
networks:
- turborepo-network

networks:
turborepo-network:
driver: bridge
15 changes: 15 additions & 0 deletions docker/Dockerfile.backend-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:20.12.0-alpine3.19

WORKDIR /app

COPY package.json package-lock.json turbo.json tsconfig.json ./

COPY apps/backend-server ./apps/backend-server
COPY packages ./packages

RUN npm install
RUN npm run db:generate

RUN npm run build

CMD ["npm", "run", "start-backend-server"]
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"lint": "turbo lint -- --max-warnings 20",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"db:generate": "cd packages/prisma-db && npx prisma generate && cd ../..",
"start-dashboard-app": "cd ./apps/dashboard-app && npm run start"
"start-dashboard-app": "cd ./apps/dashboard-app && npm run start",
"start-backend-server": "cd ./apps/backend-server && npm run start"
},
"exports": {
"./zod": "./src/index.ts"
Expand Down

0 comments on commit 1115c4c

Please sign in to comment.