-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# this folder contains scripts related to azure devops | ||
|
||
## preparations | ||
- install the azure cli tool | ||
|
||
## usage | ||
- first create a .env file by copying .env.example and filling in the values | ||
- next use az-login.sh to login to use the az cli | ||
|
||
* az-app-info.sh -> show info about the azure webapp | ||
* az-app-download-logs -> get application logs (useful if the app refuses to start up) | ||
* az-app-restart -> guess what this does :-) | ||
|
||
# setup web app for next js startup | ||
* az-app-set-config -> setup web app for next js startup (node server.js) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set -o allexport; source .env; set +o allexport | ||
|
||
# az webapp log tail --name $AZURE_WEBAPP_NAME --resource-group $AZURE_RESOURCE_GROUP | ||
az webapp ssh --name $AZURE_WEBAPP_NAME --resource-group $AZURE_RESOURCE_GROUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# this folder contains scripts related to setting up github actions for CI/CD | ||
|
||
# preparations | ||
|
||
- in the github folder, copy variables.env.example to variables.env and fill in the missing values | ||
- get the publishsettings for the webapp (from azure) and save them as production.PublishSettings in the github folder (see example.PublishSettings) | ||
|
||
- use the install-gh.sh script to install the github commandline tool | ||
|
||
# adding secrets to the repository and enabling actions | ||
|
||
- from the root folder run | ||
|
||
``` | ||
bash github/setup-actions.sh | ||
``` | ||
|
||
now check the variables in the script output | ||
|
||
#changing the database url separately | ||
|
||
``` | ||
gh variable set DATABASE_URL --body "connection string" | ||
cd azure | ||
bash az-login.sh | ||
bash az-app-restart.sh | ||
``` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
REPOSITORY=mosbuma/fietsberaad-veiligstallen-app | ||
# gh api --method PUT -H "Accept: application/vnd.github+json" repos/$REPOSITORY/environments/$ENVIRONMENT | ||
|
||
#publish or update the workflow variables | ||
gh variable set -f ./github/variables.env | ||
|
||
#publish or update secret azure publish profile (set separately because it is a multiline value) | ||
gh variable set AZUREAPPSERVICE_PUBLISHPROFILE_VEILIGSTALLEN < ./github/vstfb-eu-acc-app01.PublishSettings | ||
|
||
#publish or update remainder of the secrets are set in a single file | ||
# gh secret set -a actions AZUREAPPSERVICE_PUBLISHPROFILE_VEILIGSTALLEN -f ./github/secrets.env | ||
gh variable set AZUREAPPSERVICE_PUBLISHPROFILE_VEILIGSTALLEN < ./github/production.PublishSettings | ||
|
||
#enable the ci/cd action | ||
gh workflow enable azure-webapps-node.yml | ||
|
||
gh variable list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
AZURE_APP_NAME= | ||
NEXTAUTH_SECRET= | ||
NEXTAUTH_URL=/login | ||
NEXT_PUBLIC_MAPBOX_TOKEN= | ||
DATABASE_URL= | ||
NEXT_PUBLIC_API_BASE_URL=/ | ||
NEXT_PUBLIC_WEB_BASE_URL=/ |