Skip to content

Commit

Permalink
Merge pull request #36 from Rikthepixel/fix/kubernetes-deployment
Browse files Browse the repository at this point in the history
Fix/kubernetes deployment
  • Loading branch information
Rikthepixel authored Jan 10, 2024
2 parents e1a7071 + bc79ad8 commit e19546f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 50 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:

- name: Set env variables
run: |
echo "VITE_BACKEND_URL=sq.api.rikdenbreejen.nl" >> ./.env
echo "VITE_AUTH_DOMAIN_URL=https://square-market.eu.auth0.com" >> ./env
echo "VITE_AUTH_CLIENT_ID=PObklfrWNeQzWTEsWP6mTkRuSCPgZn7r" >> ./env
echo "VITE_BACKEND_URL=sq.api.rikdenbreejen.nl" >> ./apps/frontend/.env
echo "VITE_AUTH_DOMAIN_URL=https://square-market.eu.auth0.com" >> ./apps/frontend.env
echo "VITE_AUTH_CLIENT_ID=PObklfrWNeQzWTEsWP6mTkRuSCPgZn7r" >> ./apps/frontend/.env
- name: Build application
run: npm run build -w apps/frontend
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-microservices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ jobs:
--from-literal=ALLOWED_ORIGIN="sq.rikdenbreejen.nl"
kubectl create secret generic account-service-secrets \
--from-literal=DATABASE_USER="${{ secrets.DB_ADMIN_USER }}" \
--from-literal=DATABASE_USER="${{ secrets.DB_ADMIN_USER }}@squaremarket-accounts" \
--from-literal=DATABASE_PASSWORD="${{ secrets.DB_ADMIN_PASSWORD }}" \
--from-literal=DATABASE_HOST="${{ vars.ACCOUNTS_DB_HOST }}" \
--from-literal=DATABASE_PORT="3306" \
--from-literal=DATABASE_NAME="accounts"
kubectl create secret generic advertisement-service-secrets \
--from-literal=DATABASE_USER="${{ secrets.DB_ADMIN_USER }}" \
--from-literal=DATABASE_USER="${{ secrets.DB_ADMIN_USER }}@squaremarket-advertisements" \
--from-literal=DATABASE_PASSWORD="${{ secrets.DB_ADMIN_PASSWORD }}" \
--from-literal=DATABASE_HOST="${{ vars.ADVERTISEMENTS_DB_HOST }}" \
--from-literal=DATABASE_PORT="3306" \
Expand Down
12 changes: 6 additions & 6 deletions apps/frontend/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Backend
VITE_BACKEND_URL=http://localhost:8080

# Auth
VITE_AUTH_DOMAIN=
VITE_AITH_CLIENT_ID=
# Backend
VITE_BACKEND_URL=http://localhost:8080

# Auth
VITE_AUTH_DOMAIN=
VITE_AITH_CLIENT_ID=
8 changes: 1 addition & 7 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,6 @@ resource "azurerm_storage_account" "frontend-account" {
}
}

resource "azurerm_storage_container" "frontendstorage-container" {
name = "frontend-storage-container"
storage_account_name = azurerm_storage_account.frontend-account.name
container_access_type = "private"
}

resource "azurerm_storage_account" "storage-account" {
name = "squaremarketblobstorage"
resource_group_name = azurerm_resource_group.squaremarket-group.name
Expand All @@ -204,7 +198,7 @@ resource "azurerm_storage_account" "storage-account" {
}

resource "azurerm_storage_container" "storage-container" {
name = "storage-container"
name = "advertisement-images"
storage_account_name = azurerm_storage_account.storage-account.name
container_access_type = "private"
}
Expand Down
36 changes: 4 additions & 32 deletions terraform.tfstate
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 4,
"terraform_version": "1.6.4",
"serial": 56,
"serial": 60,
"lineage": "b638d247-bec4-7079-c94c-62b1fc867340",
"outputs": {},
"resources": [
Expand Down Expand Up @@ -1072,34 +1072,6 @@
}
]
},
{
"mode": "managed",
"type": "azurerm_storage_container",
"name": "frontendstorage-container",
"provider": "provider[\"registry.terraform.io/hashicorp/azurerm\"]",
"instances": [
{
"schema_version": 1,
"attributes": {
"container_access_type": "private",
"has_immutability_policy": false,
"has_legal_hold": false,
"id": "https://squaremarketfrontend.blob.core.windows.net/frontend-storage-container",
"metadata": {},
"name": "frontend-storage-container",
"resource_manager_id": "/subscriptions/a210845b-25ae-4bcf-8aea-919dfd0a4467/resourceGroups/squaremarket-group/providers/Microsoft.Storage/storageAccounts/squaremarketfrontend/blobServices/default/containers/frontend-storage-container",
"storage_account_name": "squaremarketfrontend",
"timeouts": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInJlYWQiOjMwMDAwMDAwMDAwMCwidXBkYXRlIjoxODAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=",
"dependencies": [
"azurerm_resource_group.squaremarket-group",
"azurerm_storage_account.frontend-account"
]
}
]
},
{
"mode": "managed",
"type": "azurerm_storage_container",
Expand All @@ -1112,10 +1084,10 @@
"container_access_type": "private",
"has_immutability_policy": false,
"has_legal_hold": false,
"id": "https://squaremarketblobstorage.blob.core.windows.net/storage-container",
"id": "https://squaremarketblobstorage.blob.core.windows.net/advertisement-images",
"metadata": {},
"name": "storage-container",
"resource_manager_id": "/subscriptions/a210845b-25ae-4bcf-8aea-919dfd0a4467/resourceGroups/squaremarket-group/providers/Microsoft.Storage/storageAccounts/squaremarketblobstorage/blobServices/default/containers/storage-container",
"name": "advertisement-images",
"resource_manager_id": "/subscriptions/a210845b-25ae-4bcf-8aea-919dfd0a4467/resourceGroups/squaremarket-group/providers/Microsoft.Storage/storageAccounts/squaremarketblobstorage/blobServices/default/containers/advertisement-images",
"storage_account_name": "squaremarketblobstorage",
"timeouts": null
},
Expand Down

0 comments on commit e19546f

Please sign in to comment.