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

201 configure azure infrastructure #239

Merged
merged 35 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b2aec28
- Update project setup instructions and dependencies
mlhaufe Jul 25, 2024
324a312
Updated azure infra to trigger on workflow dispatch
mlhaufe Jul 25, 2024
38e66ea
Merge branch 'master' into 201-configure-azure-infrastructure
mlhaufe Jul 25, 2024
6e695e5
chore: Update Azure infrastructure workflow to include validation ste…
mlhaufe Jul 25, 2024
794d49e
- Update Azure infrastructure workflow to use latest version of Azure…
mlhaufe Jul 25, 2024
270babd
Merge branch 'master' into 201-configure-azure-infrastructure
mlhaufe Jul 25, 2024
8a4cf61
- Updated action/checkout version
mlhaufe Jul 25, 2024
985a67e
Merge branch '201-configure-azure-infrastructure' of https://github.c…
mlhaufe Jul 25, 2024
25aa326
Merge branch 'master' into 201-configure-azure-infrastructure
mlhaufe Jul 25, 2024
ffcaca5
Updated azure/arm-deploy version
mlhaufe Jul 25, 2024
80b0cae
Merge branch '201-configure-azure-infrastructure' of https://github.c…
mlhaufe Jul 25, 2024
d961496
chore: Verify Resource Group existence in Azure infrastructure workflow
mlhaufe Jul 25, 2024
2d77217
- removed debug step from pipeline
mlhaufe Jul 25, 2024
e0c166f
chore: Comment out unused parameters in Azure infrastructure workflow
mlhaufe Jul 25, 2024
cb71bf6
refactor: Update Azure Bicep resource name parameter
mlhaufe Jul 25, 2024
1f39779
Merge branch 'master' into 201-configure-azure-infrastructure
mlhaufe Jul 25, 2024
effe193
refactor: Update Azure Bicep resource name parameter size
mlhaufe Jul 25, 2024
d59729f
Merge branch 'master' into 201-configure-azure-infrastructure
mlhaufe Jul 25, 2024
53b7ff7
deploying service plan and app service
mlhaufe Jul 25, 2024
79a37a7
Merge branch 'master' into 201-configure-azure-infrastructure
mlhaufe Jul 25, 2024
d60092d
Added env variables to bicep and workflow
mlhaufe Jul 26, 2024
0f86b7c
Merge branch 'master' into 201-configure-azure-infrastructure
mlhaufe Jul 26, 2024
6791c81
fixed parameters formatting
mlhaufe Jul 26, 2024
a96cba1
Merge branch '201-configure-azure-infrastructure' of https://github.c…
mlhaufe Jul 26, 2024
f3e0bbd
Merge branch 'master' into 201-configure-azure-infrastructure
mlhaufe Jul 26, 2024
c9702a0
Provided compose.yml to bicep template for Azure deployment
mlhaufe Jul 26, 2024
c94789d
Merge branch 'master' into 201-configure-azure-infrastructure
mlhaufe Jul 26, 2024
7de3acd
bugfixed bicep dockerComposeFileparameter
mlhaufe Jul 26, 2024
be64748
Merge branch 'master' into 201-configure-azure-infrastructure
mlhaufe Jul 26, 2024
0a7c2a7
Added additional app config variables
mlhaufe Jul 26, 2024
6f2b708
Merge branch '201-configure-azure-infrastructure' of https://github.c…
mlhaufe Jul 26, 2024
4f70379
Merge branch 'master' into 201-configure-azure-infrastructure
mlhaufe Jul 26, 2024
ce70732
Loading compose file directly in bicep template
mlhaufe Jul 26, 2024
951e594
Merge branch 'master' into 201-configure-azure-infrastructure
mlhaufe Jul 26, 2024
846ac81
chore: Update compose.yml and compose.extend.yml for Azure deployment…
mlhaufe Jul 26, 2024
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
8 changes: 7 additions & 1 deletion .devcontainer/compose.extend.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
services:
db:
volumes:
- postgres-data:/var/lib/postgresql/data
web:
image: node:22.5.1-bookworm
depends_on:
Expand All @@ -10,4 +13,7 @@ services:
# Overrides default command so things don't shut down after the process ends.
command: /bin/sh -c "while sleep 1000; do :; done"
# puts the Dev Container on the same network as the database, so that it can access it on localhost
network_mode: service:db
network_mode: service:db

volumes:
postgres-data:
14 changes: 0 additions & 14 deletions .github/workflows/azure-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ jobs:
- name: Lint Bicep
run: |
az bicep build --file ./azure/bicep/main.bicep
- name: Convert compose.yml to base64
id: convert_compose
run: |
base64 ./compose.yml > compose.base64
base64Compose=$(cat compose.base64)
echo "::set-output name=base64Compose::$base64Compose"
- name: Run what-if
uses: azure/arm-deploy@v2
with:
Expand All @@ -46,7 +40,6 @@ jobs:
postgresPassword=${{ secrets.POSTGRES_PASSWORD }}
postgresPort=${{ secrets.POSTGRES_PORT }}
postgresUser=${{ secrets.POSTGRES_USER }}
base64Compose=${{ steps.convert_compose.outputs.base64Compose }}
scope: 'resourcegroup'
deploymentMode: 'Incremental'
failOnStdErr: false
Expand All @@ -64,12 +57,6 @@ jobs:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Convert compose.yml to base64
id: convert_compose
run: |
base64 ./compose.yml > compose.base64
base64Compose=$(cat compose.base64)
echo "::set-output name=base64Compose::$base64Compose"
- name: Deploy Bicep
uses: azure/arm-deploy@v2
with:
Expand All @@ -88,6 +75,5 @@ jobs:
postgresPassword=${{ secrets.POSTGRES_PASSWORD }}
postgresPort=${{ secrets.POSTGRES_PORT }}
postgresUser=${{ secrets.POSTGRES_USER }}
base64Compose=${{ steps.convert_compose.outputs.base64Compose }}
scope: 'resourcegroup'
failOnStdErr: false
3 changes: 2 additions & 1 deletion azure/bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ param location string = resourceGroup().location
@minLength(3)
@maxLength(22)
param name string = 'cathedral'
param base64Compose string

var base64Compose = loadFileAsBase64('../../compose.yml')

@secure()
param authOrigin string
Expand Down
10 changes: 2 additions & 8 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
ports:
- 5432:5432
volumes:
- postgres-data:/var/lib/postgresql/data
- ${WEBAPP_STORAGE_HOME}/pgdata:/var/lib/postgresql/data
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_USER: ${POSTGRES_USER}
Expand All @@ -16,13 +16,7 @@ services:
depends_on:
- db
restart: unless-stopped
# mounts the workspace folder from the local source tree into the Dev Container.
# volumes:
# - .:/workspace/cathedral:cached
# Overrides default command so things don't shut down after the process ends.
command: /bin/sh -c "while sleep 1000; do :; done"
# puts the Dev Container on the same network as the database, so that it can access it on localhost
network_mode: service:db

volumes:
postgres-data:
network_mode: service:db
Loading