CI / build (push) Successful in 12s
The webapp now deploys from its own release as a static-server Swarm stack (deploy/static.yml, tern.mtps.pl on 11902) instead of driving the server's deployment. It's built with VITE_TERN_API — the TERN_API_URL repository variable, defaulting to https://tern-api.mtps.pl — and sends REST calls and the live-update socket there. Empty (development), it stays same-origin behind Vite's proxy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
# tern-web's deployment: a Swarm stack of ygg/static-server serving this
|
|
# version's release asset, on tern.mtps.pl (deploy/static in the ygg
|
|
# management repo). Run by this repo's release workflow through
|
|
# ygg/actions/deploy; `version` arrives as an extra var (the tag without
|
|
# its v) and is templated in by Ansible.
|
|
#
|
|
# The webapp talks to tern-server at tern-api.mtps.pl, baked in at build
|
|
# time (VITE_TERN_API in the release workflow).
|
|
|
|
static_stack_name: tern-web
|
|
|
|
domain: tern.mtps.pl
|
|
cert: mtps.pl
|
|
|
|
static_service:
|
|
name: static
|
|
image: git.app.ygg/ygg/static-server:latest
|
|
environment:
|
|
GITEA_REPOSITORY_URL: https://git.app.ygg/mtps/tern-web
|
|
GITEA_RELEASE: "v{{ version }}"
|
|
GITEA_ASSET_NAME: "tern-web-{{ version }}.tgz"
|
|
SSL_CERT_FILE: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
|
|
volumes:
|
|
- /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem:/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem:ro
|
|
ports:
|
|
- target: 8080
|
|
published: 11902
|
|
protocol: tcp
|
|
mode: ingress
|
|
replicas: 2
|
|
restart_policy:
|
|
condition: on-failure
|