update commands for postgres #13

Merged
LiamPietralla merged 2 commits from fix/postgres into main 2025-10-20 12:23:58 +11:00
2 changed files with 60 additions and 2 deletions
Showing only changes of commit 78788f05e3 - Show all commits

View File

@@ -46,6 +46,7 @@ jobs:
images: liamsgit.dev/LiamPietralla/code-snippets images: liamsgit.dev/LiamPietralla/code-snippets
tags: | tags: |
type=raw,value=latest type=raw,value=latest
type=sha,value=${{ github.sha }}
- name: Login to Registry - name: Login to Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
@@ -98,5 +99,16 @@ jobs:
ansible-playbook infra/ansible/deploy-playbook.yml --private-key private.key --inventory hosts.ini ansible-playbook infra/ansible/deploy-playbook.yml --private-key private.key --inventory hosts.ini
env: env:
APP_HOST: ${{ secrets.APP_HOST }} APP_HOST: ${{ secrets.APP_HOST }}
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }} REGISTRY_USERNAME: ${{ secrets.DOCKER_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
# - name: Setup Nomad
# uses: hashicorp/setup-nomad@main
# with:
# nomad_version: '1.10.5'
# - name: Deploy Job to Nomad
# run: |
# nomad job run -var="version=${{ github.sha }}" infra/nomad/code-snippets.nomad.hcl
# env:
# NOMAD_ADDR: ${{ vars.NOMAD_ADDR }}

View File

@@ -0,0 +1,46 @@
variable "version" {
type = string
default = "latest"
}
job "code-snippets" {
datacenters = ["dc1"]
type = "service"
group "code-snippets" {
count = 1
network {
port "http" {
to = 80
}
}
task "code-snippets" {
driver = "docker"
config {
image = "liamsgit.dev/LiamPietralla/code-snippets:${var.version}"
force_pull = true
ports = ["http"]
}
service {
name = "code-snippets"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.code-snippets.rule=PathPrefix(`/`)",
"traefik.http.routers.code-snippets.entrypoints=p5003"
]
check {
type = "http"
path = "/"
interval = "10s"
timeout = "2s"
}
}
}
}
}