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
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"formulahendry.vscode-mysql"
]
}
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.8-alpine
RUN apk add gcc musl-dev mariadb-connector-c-dev
COPY requirements.txt /tmp
WORKDIR /tmp
RUN pip install --upgrade pip && \
pip install -r requirements.txt
RUN mkdir /app
WORKDIR /app
COPY app.py .
ENTRYPOINT [ "python" ]
CMD [ "app.py" ]
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# devops-python-app
Simple Python app code for DevOps challenges
This application is a simple web application that keeps the scores of devops and prints it to the screen. The application was developed with python and was used flask web framework. Mysql is used as database. The libraries required for the application are also available in requirement.txt.

The application contains docker container. The Docker image runs on Alpine Linux. Kubernetes engine is used for container orchestration.

Two separate branches were created for the application. One of them is the local branch and the other is the main branch. The application developer develops and tests the code on its own environment. It then merges the changes into the main branch. The change on the main branch is automatically detected and deployment is made to the product environment.

Kubernetes secrets are used for application variables on product environment. In the local development environment, the variables are kept on the OS environment variable.
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flask
mysqlclient