-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (70 loc) · 2.26 KB
/
Copy pathdocker-compose.yml
File metadata and controls
74 lines (70 loc) · 2.26 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
62
63
64
65
66
67
68
69
70
71
72
73
74
# Gabriel — local / single-box compose stack.
#
# Two services:
# - api : .NET 10 backend, exposes 8080 inside the network
# - webapp : nginx serving the Vite SPA + reverse-proxying /api/ to the api
#
# Persistent state lives in named volumes so the SQLite DB, uploaded project
# files, and the daily rolling log files survive `docker compose down`.
#
# Run:
# cp .env.example .env
# # edit .env, fill in REPLACE_ME values
# docker compose up --build
services:
api:
build:
context: ./src/api
dockerfile: Gabriel.API/Dockerfile
# docs/ is at the repo root, OUTSIDE this service's primary build
# context (./src/api). BuildKit's named contexts let the Dockerfile
# COPY it in via `COPY --from=docs` without us having to widen the
# whole build context (which would drag node_modules, .git, etc. into
# the build cache). The resulting image carries docs at /app/docs so
# LocalDocsLookup resolves them with no host mount required.
additional_contexts:
docs: ./docs
image: gabriel-api:latest
container_name: gabriel-api
restart: unless-stopped
env_file:
- .env
# Override a few env vars the container needs regardless of .env content.
environment:
ASPNETCORE_URLS: ${ASPNETCORE_URLS:-http://+:8080}
volumes:
- gabriel-data:/app/data
- gabriel-logs:/app/logs
- gabriel-projects:/app/projects-data
# OPTIONAL dev override: overlays the host docs/ on top of the image's
# baked-in copy so edits to docs/ on the host are picked up without
# rebuilding the image. Safe to remove for production-style deploys.
- ./docs:/app/docs:ro
expose:
- "8080"
# Optional: expose the API directly on the host too, useful for hitting
# Swagger or curl-ing the API while bypassing nginx.
ports:
- "${API_PORT:-6040}:8080"
networks:
- gabriel-net
webapp:
build:
context: ./src/webapp
dockerfile: Dockerfile
image: gabriel-webapp:latest
container_name: gabriel-webapp
restart: unless-stopped
depends_on:
- api
ports:
- "${WEB_PORT:-6080}:80"
networks:
- gabriel-net
networks:
gabriel-net:
driver: bridge
volumes:
gabriel-data:
gabriel-logs:
gabriel-projects: