align dependency runtime baselines across Docker and CI

This commit is contained in:
alex wiesner
2026-03-15 15:40:40 +00:00
parent 566077533b
commit 7f03da23dd
15 changed files with 54 additions and 22 deletions

View File

@@ -1,6 +1,6 @@
services:
db:
image: postgis/postgis:15-3.3
image: postgis/postgis:16-3.5
container_name: voyage-db
restart: unless-stopped
ports:

View File

@@ -13,16 +13,17 @@ on:
env:
IMAGE_NAME: "voyage-backend"
PYTHON_IMAGE: "python:3.13-slim"
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -48,6 +49,8 @@ jobs:
with:
context: ./backend
platforms: linux/amd64,linux/arm64
build-args: |
PYTHON_IMAGE=${{ env.PYTHON_IMAGE }}
push: true
tags: |
ghcr.io/${{ steps.repo_owner.outputs.repo_owner }}/${{ env.IMAGE_NAME }}:beta

View File

@@ -15,6 +15,7 @@ on:
env:
IMAGE_NAME: "voyage-backend"
PYTHON_IMAGE: "python:3.13-slim"
jobs:
upload:
@@ -50,6 +51,8 @@ jobs:
with:
context: ./backend
platforms: linux/amd64,linux/arm64
build-args: |
PYTHON_IMAGE=${{ env.PYTHON_IMAGE }}
push: true
tags: |
ghcr.io/${{ steps.repo_owner.outputs.repo_owner }}/${{ env.IMAGE_NAME }}:latest

View File

@@ -10,16 +10,17 @@ on:
env:
IMAGE_NAME: "voyage-backend"
PYTHON_IMAGE: "python:3.13-slim"
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -45,6 +46,8 @@ jobs:
with:
context: ./backend
platforms: linux/amd64,linux/arm64
build-args: |
PYTHON_IMAGE=${{ env.PYTHON_IMAGE }}
push: true
tags: |
ghcr.io/${{ steps.repo_owner.outputs.repo_owner }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }}

View File

@@ -15,15 +15,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: set up python 3.12
- name: set up python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
- name: install dependencies
run: |
sudo apt update -q
sudo apt install -y -q python3-gdal
sudo apt install -y -q gdal-bin libgdal-dev
- name: start database
run: |

View File

@@ -13,16 +13,17 @@ on:
env:
IMAGE_NAME: "voyage-frontend"
BUN_VERSION: "1.3.10"
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -48,6 +49,8 @@ jobs:
with:
context: ./frontend
platforms: linux/amd64,linux/arm64
build-args: |
BUN_VERSION=${{ env.BUN_VERSION }}
push: true
tags: |
ghcr.io/${{ steps.repo_owner.outputs.repo_owner }}/${{ env.IMAGE_NAME }}:beta

View File

@@ -15,6 +15,7 @@ on:
env:
IMAGE_NAME: "voyage-frontend"
BUN_VERSION: "1.3.10"
jobs:
upload:
@@ -50,6 +51,8 @@ jobs:
with:
context: ./frontend
platforms: linux/amd64,linux/arm64
build-args: |
BUN_VERSION=${{ env.BUN_VERSION }}
push: true
tags: |
ghcr.io/${{ steps.repo_owner.outputs.repo_owner }}/${{ env.IMAGE_NAME }}:latest

View File

@@ -10,16 +10,17 @@ on:
env:
IMAGE_NAME: "voyage-frontend"
BUN_VERSION: "1.3.10"
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -45,6 +46,8 @@ jobs:
with:
context: ./frontend
platforms: linux/amd64,linux/arm64
build-args: |
BUN_VERSION=${{ env.BUN_VERSION }}
push: true
tags: |
ghcr.io/${{ steps.repo_owner.outputs.repo_owner }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }}

View File

@@ -17,6 +17,8 @@ jobs:
- name: setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.10
- name: install dependencies
working-directory: frontend

View File

@@ -41,6 +41,9 @@ jobs:
image-scan:
name: Trivy Docker Image Scan (Backend & Frontend)
runs-on: ubuntu-latest
env:
BUN_VERSION: "1.3.10"
PYTHON_IMAGE: "python:3.13-slim"
steps:
- name: Checkout code
@@ -57,10 +60,10 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build backend Docker image
run: docker build -t voyage-backend ./backend
run: docker build --build-arg PYTHON_IMAGE=${{ env.PYTHON_IMAGE }} -t voyage-backend ./backend
- name: Build frontend Docker image
run: docker build -t voyage-frontend ./frontend
run: docker build --build-arg BUN_VERSION=${{ env.BUN_VERSION }} -t voyage-frontend ./frontend
- name: Scan backend Docker image with Trivy
uses: aquasecurity/trivy-action@master