Skip to content

Commit 5d7e766

Browse files
CI/CD Pipeline with assignment 2 documentation (#120)
1 parent 69db0ce commit 5d7e766

File tree

9 files changed

+11
-9
lines changed

9 files changed

+11
-9
lines changed

.github/workflows/autodeploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI/CD Pipeline
22

33
on:
44
push:
5-
branches: develop
5+
branches: main
66
jobs:
77
CI-PIPELINE:
88
runs-on: ubuntu-latest

CICD/Dockerfile(backend)

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ COPY . .
1717
EXPOSE 8081
1818

1919
# Start the application
20-
CMD ["npm", "run", "dev"]
20+
CMD ["npm", "run", "prod"]

CICD/Dockerfile(frontend)

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ EXPOSE 8081
1818
EXPOSE 5173
1919

2020
# Start the application
21-
CMD ["npm", "run", "dev"]
21+
CMD ["npm", "run", "prod"]

CICD/ReadME.pdf

120 KB
Binary file not shown.

CICD/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
volumes:
1313
- ./backend:/app
1414
- /app/node_modules
15-
command: ["npm", "run", "dev"]
15+
command: ["npm", "run", "prod"]
1616
networks:
1717
- course-matrix-net
1818

@@ -27,7 +27,7 @@ services:
2727
volumes:
2828
- ./frontend:/app
2929
- /app/node_modules
30-
command: ["npm", "run", "dev"]
30+
command: ["npm", "run", "prod"]
3131
depends_on:
3232
- backend
3333
networks:

course-matrix/backend/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"dev": "ts-node -r dotenv/config src/index.ts",
88
"test": "jest",
99
"test:watch": "jest --watch",
10-
"build": "vite build"
10+
"build": "vite build",
11+
"prod": "ts-node -r dotenv/config src/index.ts"
1112
},
1213
"keywords": [],
1314
"author": "",

course-matrix/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
volumes:
1313
- ./backend:/app
1414
- /app/node_modules
15-
command: ["npm", "run", "dev"]
15+
command: ["npm", "run", "prod"]
1616
networks:
1717
- course-matrix-net
1818

@@ -27,7 +27,7 @@ services:
2727
volumes:
2828
- ./frontend:/app
2929
- /app/node_modules
30-
command: ["npm", "run", "dev"]
30+
command: ["npm", "run", "prod"]
3131
depends_on:
3232
- backend
3333
networks:

course-matrix/frontend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ EXPOSE 8081
1818
EXPOSE 5173
1919

2020
# Start the application
21-
CMD ["npm", "run", "dev"]
21+
CMD ["npm", "run", "prod"]

course-matrix/frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"build": "vite build",
99
"lint": "eslint .",
1010
"preview": "vite preview",
11+
"prod": "vite build && vite preview --port 5173",
1112
"test": "jest",
1213
"test:watch": "jest --watch"
1314
},

0 commit comments

Comments
 (0)