Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atrakic/azure-sql-deploy-dacpac
SQL project to deploy a star schema as dacpac package with Github Actions. Includes IaC(bicep) to create SQL server on Azure Cloud.
https://github.com/atrakic/azure-sql-deploy-dacpac
sql sql-server sqlproject
Last synced: 19 days ago
JSON representation
SQL project to deploy a star schema as dacpac package with Github Actions. Includes IaC(bicep) to create SQL server on Azure Cloud.
- Host: GitHub
- URL: https://github.com/atrakic/azure-sql-deploy-dacpac
- Owner: atrakic
- License: mit
- Created: 2024-09-19T09:32:34.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-11T15:46:30.000Z (about 2 months ago)
- Last Synced: 2024-12-11T16:41:47.739Z (about 2 months ago)
- Topics: sql, sql-server, sqlproject
- Language: TSQL
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# azure-sql-deploy-dacpac
[![license](https://img.shields.io/github/license/atrakic/azure-sql-deploy-dacpac.svg)](https://github.com/atrakic/azure-sql-deploy-dacpac/blob/main/LICENSE)
[![ci](https://github.com/atrakic/azure-sql-deploy-dacpac/actions/workflows/ci.yml/badge.svg)](https://github.com/atrakic/azure-sql-deploy-dacpac/actions/workflows/ci.yml)## Overview
> This project demonstrates how to automate test a star schema development with 'microsoft.sqlpackage' using a GitHub Actions & Docker.
## Flow
1. Build SQL server objects (tables, views, and instance objects)
2. Dacpack file is created
3. Contents of dacpac is consumed by Github Actions
4. Deploy against a SQL database## Deployment prerequisites
- Azure Subscription## Setup
1. Create a new Azure Service Principal
2. Create a new Azure SQL Database, see infra [Makefile](./infra/Makefile) for more details.## Configuration
1. Add the following secrets to your GitHub repository:
- `AZURE_SQL_CONNECTION_STRING` - Azure SQL Database connection string of your database## Azure Deployment
1. Run database deployment from github actions tab. See [deploy.yml](.github/workflows/deploy.yml)## Local development environment
To run sql project in Docker, follow these steps:1. Build and start the necessary containers
```bash
make docker
```2. Examine the logs
```bash
docker compose logs -f
```