-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dummy veilarbaktivitet app med postgres i gcp
- Loading branch information
1 parent
7d40665
commit 44f27c5
Showing
5 changed files
with
90 additions
and
0 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,31 @@ | ||
name: Build and deploy | ||
on: | ||
push: | ||
branches: | ||
- gcp-premigrering | ||
permissions: | ||
contents: read | ||
id-token: write | ||
jobs: | ||
build_and_deploy: | ||
name: Build, push and deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Push docker image to GAR | ||
uses: nais/docker-build-push@v0 | ||
id: docker-build-push | ||
with: | ||
team: dab | ||
owner: dab | ||
dockerfile: dummy-app/Dockerfile | ||
image_suffix: dummy | ||
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} # Provided as Organization Secret | ||
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} # Provided as Organization Variable | ||
- name: Deploy to NAIS | ||
uses: nais/deploy/actions/deploy@v2 | ||
env: | ||
CLUSTER: dev-gcp | ||
APIKEY: ${{ secrets.DAB_NAIS_DEPLOY_APIKEY }} | ||
RESOURCE: nais/nais-dev-gcp.yaml | ||
VAR: image=${{ steps.docker-build-push.outputs.image }} |
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,10 @@ | ||
FROM busybox:latest | ||
ENV PORT=8080 | ||
|
||
ADD ./dummy-app/www/index.html /www/index.html | ||
ADD ./dummy-app/www/hello-nais.png /www/hello-nais.png | ||
|
||
HEALTHCHECK CMD nc -z localhost $PORT | ||
|
||
# Create a basic webserver and run it until the container is stopped | ||
CMD echo "httpd started" && trap "exit 0;" TERM INT; httpd -v -p $PORT -h /www -f & wait |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
body { | ||
background-color: rgb(125, 159, 169); | ||
} | ||
.center { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="center"> | ||
<img src="hello-nais.png" alt="Hello Nais"> | ||
</div> | ||
</body> | ||
</html> |
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 @@ | ||
apiVersion: nais.io/v1alpha1 | ||
kind: Application | ||
|
||
metadata: | ||
name: veilarbaktivitet | ||
namespace: dab | ||
labels: | ||
team: dab | ||
spec: | ||
ingresses: | ||
- https://veilarbaktivitet.dev.nav.cloud.nais.io | ||
image: {{image}} | ||
port: 8080 | ||
ttl: 3h | ||
replicas: | ||
max: 1 | ||
min: 1 | ||
resources: | ||
requests: | ||
cpu: 50m | ||
memory: 32Mi | ||
gcp: | ||
sqlInstances: | ||
- name: veilarbaktivitet | ||
type: POSTGRES_14 | ||
databases: | ||
- name: veilarbaktivitet | ||
envVarPrefix: DB |