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
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Continues Integration Pipeline

on:
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
dockerimagebuild:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}


- name: FrontEndBuildAndPush
uses: docker/build-push-action@v6
with:
file: ./Dockerfile.fe
push: true
tags: ozgurozturknet/siemensgitegitim:frontend

- name: BackendEndBuildAndPush
uses: docker/build-push-action@v6
with:
file: ./Dockerfile.be
push: true
tags: ozgurozturknet/siemensgitegitim:backend

- name: DatabaseBuildAndPush
uses: docker/build-push-action@v6
with:
file: ./Dockerfile.db
push: true
tags: ozgurozturknet/siemensgitegitim:database

27 changes: 27 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: ProdDeployment

on:
push:
branches: [ deploy ]
workflow_dispatch:

jobs:
deployment:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4


- name: Deploy to Docker swarm
uses: wshihadeh/docker-deployment-action@v1
with:
remote_docker_host: ubuntu@3.125.43.15
ssh_private_key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
ssh_public_key: ${{ secrets.DOCKER_SSH_PUBLIC_KEY }}
deployment_mode: docker-compose
stack_file_name: docker-compose.yml
args: "--ansi always"
copy_stack_file: true
deploy_path: /home/ubuntu
keep_files: 5
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Bu test uygulamasıdır
12 changes: 8 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
version: '3'
services:
frontend:
image: ozgurozturknet/fe:proje
image: ozgurozturknet/siemensgitegitim:frontend
ports:
- "3000:80"
# Add any additional configuration for service1 here

backend:
image: ozgurozturknet/be:proje
image: ozgurozturknet/siemensgitegitim:backend
ports:
- "5000:80"
environment:
- DB_HOST=database
- DB_USERNAME=todo_admin
- DB_PASSWORD=password
- DB_NAME=todo_app
# Add any additional configuration for service2 here

database:
image: ozgurozturknet/db:proje
image: ozgurozturknet/siemensgitegitim:database
ports:
- "3306:3306"
environment:
Expand Down
4 changes: 2 additions & 2 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<title>HTML Web Page</title>
</head>
<body>
<h1>Merhaba BBDevOpsBootCamp Proje Ekibi</h1>
<h1>Merhaba Siemens R&D Ekibi</h1>
<h1>::Yapilacaklar Listesi::</h1>
<div id="todos"></div>

<script>
fetch("http://backend.ayti.tech/")
fetch("http://127.0.0.1:5000")
.then((response) => response.json())
.then((data) => {
const todos = document.getElementById("todos");
Expand Down