feat: build and publish release images from version tags
Tagging v* builds both images on Gitea Actions and pushes them to the instance registry, then smoke-tests the published stack. The frontend read its backend URL through import.meta.env, which Vite resolves at build time, so an image could only point at whatever the build host had; it now reads it at runtime.
This commit is contained in:
@@ -24,6 +24,10 @@ services:
|
||||
|
||||
|
||||
backend:
|
||||
image: git.jaroszew.ski/patrick/chitai-backend:${CHITAI_VERSION:-latest}
|
||||
|
||||
# Only used when the image above is not present locally. Run `docker compose build` to
|
||||
# build from source instead of pulling a release.
|
||||
build: ./backend
|
||||
|
||||
networks:
|
||||
@@ -53,6 +57,8 @@ services:
|
||||
condition: service_healthy
|
||||
|
||||
frontend:
|
||||
image: git.jaroszew.ski/patrick/chitai-frontend:${CHITAI_VERSION:-latest}
|
||||
|
||||
build: ./frontend
|
||||
|
||||
networks:
|
||||
@@ -66,6 +72,9 @@ services:
|
||||
environment:
|
||||
VITE_BACKEND_API_URL: ${CHITAI_API_URL}
|
||||
|
||||
# Must match the URL the browser uses, or SvelteKit rejects form POSTs as cross-origin.
|
||||
ORIGIN: ${CHITAI_ORIGIN:-http://localhost:3000}
|
||||
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
|
||||
Reference in New Issue
Block a user