- Rename helix-server -> server and helix-web -> web - Remove helix-api (bruno collection and docs site) - Merge per-module .gitignore files into the root .gitignore - Add README, AGENTS, CONTRIBUTING and MIT LICENCE - Add full-stack docker-compose (postgres, redis, server, web via Caddy) with web Dockerfile, Caddyfile and Compose server config - Keep the Gradle wrapper jar tracked after the .gitignore merge - Copy gradle.properties into the server Docker build image
82 lines
2.2 KiB
YAML
82 lines
2.2 KiB
YAML
name: helix
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: ${PG_DATABASE:-helix}
|
|
POSTGRES_USER: ${PG_USER:-helix}
|
|
POSTGRES_PASSWORD: ${PG_PASSWORD:-helix}
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${PG_USER:-helix} -d ${PG_DATABASE:-helix}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
restart: unless-stopped
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
command: ["redis-server", "--appendonly", "yes"]
|
|
volumes:
|
|
- redis-data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
restart: unless-stopped
|
|
|
|
server:
|
|
build:
|
|
context: ./server
|
|
args:
|
|
ARTEFACT_VERSION: ${ARTEFACT_VERSION:-0.0.1}
|
|
environment:
|
|
SPRING_PROFILES_ACTIVE: prod
|
|
PG_HOST: postgres
|
|
PG_PORT: "5432"
|
|
PG_DATABASE: ${PG_DATABASE:-helix}
|
|
PG_USER: ${PG_USER:-helix}
|
|
PG_PASSWORD: ${PG_PASSWORD:-helix}
|
|
REDIS_HOST: redis
|
|
REDIS_PORT: "6379"
|
|
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
|
|
TOKEN_SECRET: ${TOKEN_SECRET:-please-change-this-secret}
|
|
MSAL_CLIENT_ID: ${MSAL_CLIENT_ID:-}
|
|
MSAL_TENANT_ID: ${MSAL_TENANT_ID:-}
|
|
S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY_ID:-}
|
|
S3_SECRET_ACCESS_KEY: ${S3_SECRET_ACCESS_KEY:-}
|
|
volumes:
|
|
# Mounts the Compose-specific server configuration (Spring Boot picks up
|
|
# config/application-{profile}.yml next to the working directory).
|
|
- ./docker/application-prod.yml:/app/config/application-prod.yml:ro
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
ports:
|
|
- "${SERVER_PORT:-8080}:8080"
|
|
restart: unless-stopped
|
|
|
|
web:
|
|
build:
|
|
context: ./web
|
|
args:
|
|
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-/api}
|
|
VITE_MSAL_CLIENT_ID: ${VITE_MSAL_CLIENT_ID:-}
|
|
VITE_MSAL_TENANT_ID: ${VITE_MSAL_TENANT_ID:-}
|
|
VITE_APP_TITLE: ${VITE_APP_TITLE:-Helix}
|
|
VITE_DEFAULT_REGION_ABBREVIATION: ${VITE_DEFAULT_REGION_ABBREVIATION:-GB}
|
|
depends_on:
|
|
- server
|
|
ports:
|
|
- "${WEB_PORT:-80}:80"
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres-data:
|
|
redis-data:
|