Skip to content

Add Vacation Planner for Azure Database for MySQL Flexible Server - #7

Merged
paolosalvatori merged 1 commit into
mainfrom
mysql-flexible-server
Jun 15, 2026
Merged

Add Vacation Planner for Azure Database for MySQL Flexible Server#7
paolosalvatori merged 1 commit into
mainfrom
mysql-flexible-server

Conversation

@paolosalvatori

Copy link
Copy Markdown
Collaborator

Motivation

This pull request adds the Vacation Planner sample for Azure Database for MySQL Flexible Server to the repository.

Changes

This pull requests adds:

  • The source code of the Vacation Planner web app to samples/web-app-mysql-flexible-server/src folder.
  • Bash scripts and YAML manifests necessary to create the necessary Azure resources, build and push the container image, and create the web app in samples/web-app-mysql-flexible-server/scripts folder.

Copilot AI review requested due to automatic review settings June 15, 2026 14:02
@paolosalvatori
paolosalvatori merged commit 7f94e4c into main Jun 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “Vacation Planner” sample that runs a Flask web app backed by Azure Database for MySQL Flexible Server, plus supporting deployment scripts/manifests for AKS (and LocalStack).

Changes:

  • Introduces a Flask + PyMySQL implementation of the Vacation Planner app (UI, DB helper, gunicorn config).
  • Adds AKS deployment artifacts (Dockerfile, scripts, ConfigMap/Secret/Deployment/Service/Namespace manifests).
  • Registers the new sample in the repository root README.

Reviewed changes

Copilot reviewed 24 out of 65 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
samples/web-app-mysql-flexible-server/src/templates/index.html UI template for listing/adding/editing/deleting activities
samples/web-app-mysql-flexible-server/src/static/style.css Styling for the Vacation Planner UI
samples/web-app-mysql-flexible-server/src/static/bootstrap/css/bootstrap-utilities.rtl.min.css Vendored Bootstrap utilities (RTL, minified)
samples/web-app-mysql-flexible-server/src/static/bootstrap/css/bootstrap-utilities.min.css Vendored Bootstrap utilities (minified)
samples/web-app-mysql-flexible-server/src/static/bootstrap/css/bootstrap-reboot.rtl.min.css.map Source map for Bootstrap reboot (RTL, minified)
samples/web-app-mysql-flexible-server/src/static/bootstrap/css/bootstrap-reboot.rtl.min.css Vendored Bootstrap reboot (RTL, minified)
samples/web-app-mysql-flexible-server/src/static/bootstrap/css/bootstrap-reboot.rtl.css Vendored Bootstrap reboot (RTL)
samples/web-app-mysql-flexible-server/src/static/bootstrap/css/bootstrap-reboot.min.css.map Source map for Bootstrap reboot (minified)
samples/web-app-mysql-flexible-server/src/static/bootstrap/css/bootstrap-reboot.min.css Vendored Bootstrap reboot (minified)
samples/web-app-mysql-flexible-server/src/static/bootstrap/css/bootstrap-reboot.css Vendored Bootstrap reboot (unminified)
samples/web-app-mysql-flexible-server/src/requirements.txt Python dependencies for the sample
samples/web-app-mysql-flexible-server/src/gunicorn.conf.py Gunicorn worker signal handling configuration
samples/web-app-mysql-flexible-server/src/database.py MySQL client wrapper (connect/init schema/CRUD)
samples/web-app-mysql-flexible-server/src/app.py Flask application routes and wiring to the DB client
samples/web-app-mysql-flexible-server/scripts/service.yml Kubernetes Service for the web app
samples/web-app-mysql-flexible-server/scripts/secret.yml Kubernetes Secret template for sensitive env vars
samples/web-app-mysql-flexible-server/scripts/namespace.yml Kubernetes Namespace manifest
samples/web-app-mysql-flexible-server/scripts/Dockerfile Multi-stage build for the app container image
samples/web-app-mysql-flexible-server/scripts/deployment.yml Kubernetes Deployment (replicas, probes, env wiring)
samples/web-app-mysql-flexible-server/scripts/configmap.yml Kubernetes ConfigMap template for non-secret env vars
samples/web-app-mysql-flexible-server/scripts/05-deploy-app.sh Applies manifests with yq templating and deploys to AKS
samples/web-app-mysql-flexible-server/scripts/04-push-docker-image.sh Tags and pushes the image to ACR
samples/web-app-mysql-flexible-server/scripts/03-run-docker-container.sh Local container run script for smoke testing
samples/web-app-mysql-flexible-server/scripts/02-build-docker-image.sh Docker build script targeting the src/ build context
samples/web-app-mysql-flexible-server/scripts/01-deploy-resources.sh Provisions Azure resources + bootstraps schema/seed data
samples/web-app-mysql-flexible-server/scripts/00-variables.sh Shared script variables (resource names, creds, ports, etc.)
samples/web-app-mysql-flexible-server/README.md Sample-level documentation and usage instructions
README.md Adds the new MySQL Flexible Server sample to the samples list
Files not reviewed (4)
  • samples/web-app-mysql-flexible-server/src/static/bootstrap/css/bootstrap-grid.min.css: Generated file
  • samples/web-app-mysql-flexible-server/src/static/bootstrap/css/bootstrap-grid.rtl.min.css: Generated file
  • samples/web-app-mysql-flexible-server/src/static/bootstrap/css/bootstrap-reboot.css: Generated file
  • samples/web-app-mysql-flexible-server/src/static/bootstrap/css/bootstrap-reboot.min.css: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

</button>
</td>
<td class="col-btn">
<form method="post" action="{{ url_for('delete', activity_id=loop.index0) }}" class="delete-form">
Comment on lines +81 to +86
@app.route("/delete/<int:activity_id>", methods=["POST"])
def delete(activity_id: int):
if 0 <= activity_id < len(activities):
db_client.delete_activity(activities[activity_id][0])
flash("Activity deleted.")
return redirect(url_for("index"))
Comment on lines +52 to +53
activity = request.form.get("activity")
if activity:
Comment on lines +67 to +68
except (ConnectionError, ValueError) as e:
logger.error("Error writing activity: %s", e)
Comment on lines +108 to +111
ssl_ctx = ssl.create_default_context()
ssl_ctx.check_hostname = False
ssl_ctx.verify_mode = ssl.CERT_NONE
kwargs["ssl"] = ssl_ctx
Comment on lines +87 to +89
httpGet:
path: /
port: http
Comment on lines +54 to +55
yq "(.data.MYSQL_PASSWORD)|="\""$(echo -n $MYSQL_USER_PASSWORD | base64 -w0)"\" |
yq "(.data.SECRET_KEY)|="\""$(echo -n $FLASK_SECRET_KEY | base64 -w0)"\" |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants