Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add-docker-compose #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
128 changes: 64 additions & 64 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
# This is a basic workflow to help you get started with Actions

name: CI-CD

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
CI:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Autenticando no Docker Registry
# You may pin to the exact commit or the version.
# uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
uses: docker/login-action@v2.0.0
with:
username: ${{secrets.DOCKERHUB_USER}}
password: ${{secrets.DOCKERHUB_PWD}}

- name: Construção da imagem Docker
# You may pin to the exact commit or the version.
# uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94
uses: docker/build-push-action@v3.1.1
with:
context: ./src
file: ./src/Dockerfile
push: true
tags: |
fabricioveronez/rotten-potatoes:latest
fabricioveronez/rotten-potatoes:${{github.run_number}}

CD:
runs-on: ubuntu-latest
needs: [CI]
steps:
- uses: actions/checkout@v3

- name: Kubernetes Set Context
uses: Azure/k8s-set-context@v3.0
with:
method: kubeconfig
kubeconfig: ${{secrets.K8S_CONFIG}}

- name: Deploy to Kubernetes cluster
uses: Azure/k8s-deploy@v4
with:
images: fabricioveronez/rotten-potatoes:${{github.run_number}}
manifests: |
k8s/deployment.yaml

# This is a basic workflow to help you get started with Actions
name: CI-CD
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
CI:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Autenticando no Docker Registry
# You may pin to the exact commit or the version.
# uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
uses: docker/login-action@v2.0.0
with:
username: ${{secrets.DOCKERHUB_USER}}
password: ${{secrets.DOCKERHUB_PWD}}
- name: Construção da imagem Docker
# You may pin to the exact commit or the version.
# uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94
uses: docker/build-push-action@v3.1.1
with:
context: ./src
file: ./src/Dockerfile
push: true
tags: |
fabricioveronez/rotten-potatoes:latest
fabricioveronez/rotten-potatoes:${{github.run_number}}
CD:
runs-on: ubuntu-latest
needs: [CI]
steps:
- uses: actions/checkout@v3
- name: Kubernetes Set Context
uses: Azure/k8s-set-context@v3.0
with:
method: kubeconfig
kubeconfig: ${{secrets.K8S_CONFIG}}
- name: Deploy to Kubernetes cluster
uses: Azure/k8s-deploy@v4
with:
images: fabricioveronez/rotten-potatoes:${{github.run_number}}
manifests: |
k8s/deployment.yaml
262 changes: 131 additions & 131 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,131 +1,131 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

rotten-potatoes/
*.Identifier
# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
rotten-potatoes/
*.Identifier
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
Loading