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

add package.json to dockerfile #12

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 8 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

# legg til steg her:
- name: frontend dependencies
run: yarn install

- name: run tests
run: yarn test

build:
name: 'Build Docker image and push to registry'
runs-on: ubuntu-latest
needs: [run-tests]
permissions:
contents: read
packages: write
Expand Down Expand Up @@ -79,4 +84,5 @@ jobs:
- name: Run Terraform plan
run: terraform plan

# - name: Run Terraform apply
- name: Run Terraform Apply
run: terraform apply -auto-approve
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /app
RUN apk update && \
apk add yarn

COPY yarn.lock index.html ./
COPY yarn.lock index.html package.json ./

RUN yarn install --frozen-lockfile

Expand Down
3 changes: 3 additions & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ resource "azurerm_container_app" "devops" {

template {
container {
name = "iris"
image = "ghcr.io/${var.repository}/${var.my_name}:latest"
cpu = 0.25
memory = "0.5Gi"
}

min_replicas = 1
Expand Down
Loading