46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
services:
|
|
# One-shot build container. Bind-mounts the repo, runs pnpm install + build,
|
|
# writes .output to the host, then exits.
|
|
# Usage: docker compose --profile build run --rm build
|
|
build:
|
|
image: "logigate-build:latest"
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.build
|
|
volumes:
|
|
- .:/app
|
|
- ./docker-data/node_modules:/app/node_modules
|
|
env_file:
|
|
- .env
|
|
profiles:
|
|
- build
|
|
|
|
# Long-running server. Serves the pre-built .output from the host.
|
|
frontend:
|
|
image: "logigate-serve:latest"
|
|
container_name: logigate
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.serve
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- ./.output:/app/.output:ro
|
|
labels:
|
|
traefik.enable: "true"
|
|
traefik.docker.network: "web"
|
|
# nginx on the host terminates TLS with the *.blax.at wildcard cert and
|
|
# forwards plain HTTP to traefik's `web` entrypoint. This router beats
|
|
# blax-nuxt-website's *.blax.at fallback router (priority -100).
|
|
traefik.http.routers.logigate.rule: "Host(`logicate.blax.at`) || Host(`logigate.blax.at`) || Host(`logigate.localhost.at`)"
|
|
traefik.http.routers.logigate.entrypoints: "web"
|
|
traefik.http.routers.logigate.service: "logigate-http"
|
|
traefik.http.services.logigate-http.loadbalancer.server.port: "3000"
|
|
|
|
networks:
|
|
default:
|
|
name: web
|
|
external: true
|
|
driver: bridge
|