-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.homelab.yml
More file actions
61 lines (57 loc) · 2.84 KB
/
docker-compose.homelab.yml
File metadata and controls
61 lines (57 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# =============================================================================
# Docker Compose - Homelab Override (Two-Image Strategy)
# =============================================================================
# This file is for homelab/CI-CD deployments
# - Frontend: pulled from GHCR
# - Backend: built FROM base image (GHCR) + Docling layer (local)
# =============================================================================
# Use with: docker compose -f docker-compose.yml -f docker-compose.homelab.yml up -d
# =============================================================================
services:
# ===========================================================================
# Backend Service - Build from GHCR base + Docling
# ===========================================================================
# CI pushes backend:base (no Docling) to GHCR
# Homelab builds FROM base and adds Docling layer
# ===========================================================================
backend:
build:
context: ./backend
dockerfile: Dockerfile
args:
- BASE_IMAGE=ghcr.io/medevs/portfolio-backend:base
- USE_DOCLING=true
# ===========================================================================
# Celery Worker - Build from GHCR base + Docling
# ===========================================================================
celery-worker:
build:
context: ./backend
dockerfile: Dockerfile
args:
- BASE_IMAGE=ghcr.io/medevs/portfolio-backend:base
- USE_DOCLING=true
# ===========================================================================
# Frontend Service - Use GHCR Image
# ===========================================================================
# NOTE: NEXT_PUBLIC_API_URL is baked into the image at build time via
# GitHub Actions (see .github/workflows/deploy.yml). Runtime environment
# variables for NEXT_PUBLIC_* do NOT work - they must be build args.
# To change the API URL, update the NEXT_PUBLIC_API_URL secret in GitHub
# or modify the default in deploy.yml, then trigger a new build.
# ===========================================================================
frontend:
image: ghcr.io/medevs/portfolio-frontend:latest
build: !reset null
ports:
- "3100:3000"
environment:
# Only non-NEXT_PUBLIC_* runtime vars work here
- NEXT_PUBLIC_ADMIN_API_KEY=${ADMIN_API_KEY}
pull_policy: always
# ===========================================================================
# Ollama Init - Inherits from base compose
# ===========================================================================
# The ollama-init service from docker-compose.yml handles model pulling.
# No override needed - it will pull models defined in environment vars.
# ===========================================================================