Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
45 lines (43 loc) · 1.77 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
45 lines (43 loc) · 1.77 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
# docker-compose.dev.yml
#
# Local UI development stack: mock API server + production-built Nuxt frontend.
# No real .NET backend or database required.
#
# Usage:
# docker compose -f docker-compose.dev.yml up --build
#
# Frontend available at: http://localhost:3000
# Mock API available at: http://localhost:8080
services:
# ── Mock API server ──────────────────────────────────────────────────────────
# Serves all REST endpoints the frontend needs.
# See mock-server/README.md for the full endpoint list.
mock-api:
build:
context: ./mock-server
dockerfile: Dockerfile
ports:
- "8080:8080"
restart: unless-stopped
# ── Nuxt frontend ───────────────────────────────────────────────────────────
# Builds the production Nuxt image and overrides API URLs at runtime via
# Nuxt's NUXT_PUBLIC_* environment variable convention.
# Uses Dockerfile.dev (no python3/make/g++ required) for a lighter build.
frontend:
build:
context: ./addicted.nuxt
dockerfile: Dockerfile.dev
ports:
- "3000:3000"
environment:
# Point both client-side and server-side fetches at the mock API.
# Client-side (browser) uses localhost; server-side (SSR) uses the
# Docker service name.
NUXT_PUBLIC_API_CLIENT_URL: "http://localhost:8080"
NUXT_PUBLIC_API_SERVER_URL: "http://mock-api:8080"
NUXT_PUBLIC_URL: "http://localhost:3000"
# Disable Sentry in the dev stack.
NUXT_PUBLIC_SENTRY_CONFIG_ENABLED: "false"
depends_on:
- mock-api
restart: unless-stopped