Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Only include environment variables used by Docker here (others can go in project-specific .env files)

# GLOBAL
PROJECT_NAME=cicd_project

# MYSQL
MYSQL_VERSION=8.0.32
DATABASE_ROOT_PASSWORD=root
DATABASE_ADMIN_PASSWORD=admin
19 changes: 19 additions & 0 deletions back-end/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "devops-cicd",
"version": "1.0.0",
"main": "server.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Miniluchi/DevOps_CICD.git"
},
"author": "Manys",
"license": "ISC",
"bugs": {
"url": "https://github.com/Miniluchi/DevOps_CICD/issues"
},
"homepage": "https://github.com/Miniluchi/DevOps_CICD#readme",
"description": ""
}
Empty file added back-end/server.ts
Empty file.
31 changes: 31 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
services:
mysql:
image: mysql:${MYSQL_VERSION}
environment:
MYSQL_DATABASE: ${PROJECT_NAME}
MYSQL_USER: admin
MYSQL_PASSWORD: ${DATABASE_ADMIN_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DATABASE_ROOT_PASSWORD}
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
start_period: 5s
interval: 5s
timeout: 3s
retries: 4

phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
environment:
PMA_HOST: mysql
PMA_USER: root
PMA_PASSWORD: ${DATABASE_ROOT_PASSWORD}
ports:
- 8080:80
depends_on:
mysql:
condition: service_healthy

volumes:
mysql-data:
File renamed without changes.
2 changes: 2 additions & 0 deletions .gitignore → front-end/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ testem.log
# System files
.DS_Store
Thumbs.db

abubakkar-apps
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions front-end/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:20-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --legacy-peer-deps
COPY . .
RUN npm run build --configuration=production

FROM builder as final-stage
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json .
EXPOSE 4000
CMD ["node", "./dist/next-step/server/server.mjs"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.