-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (89 loc) · 2.39 KB
/
Copy pathdocker-compose.yml
File metadata and controls
97 lines (89 loc) · 2.39 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# VoxForge — Docker Compose
#
# Services are grouped with profiles so `docker compose up` stays quiet and you
# opt into what you need. The `vox` launcher script wraps all of this, but the
# raw commands work too:
#
# docker compose --profile build build build
# docker compose --profile test run --rm test
# docker compose --profile run run --rm --service-ports app
# docker compose --profile dev run --rm shell
#
# (the top-level `version:` key is obsolete in Compose v2+ and intentionally omitted)
x-build: &build-common
context: .
args:
DOTNET_VERSION: ${DOTNET_VERSION:-10.0}
ALPINE_VERSION: ${ALPINE_VERSION:-3.22}
RID: ${RID:-linux-musl-x64}
services:
build:
profiles: ["build"]
image: voxforge:build
build:
<<: *build-common
target: build
lint:
profiles: ["lint"]
image: voxforge:lint
build:
<<: *build-common
target: lint
test:
profiles: ["test"]
image: voxforge:test
build:
<<: *build-common
target: test
volumes:
- ./test-results:/test-results
app:
profiles: ["run"]
image: voxforge:runtime
build:
<<: *build-common
target: runtime
environment:
DISPLAY: ${DISPLAY:-:0}
AVALONIA_GLOBAL_SCALE_FACTOR: ${AVALONIA_GLOBAL_SCALE_FACTOR:-1}
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ${XAUTHORITY:-${HOME}/.Xauthority}:/home/vox/.Xauthority:ro
network_mode: host
watch:
profiles: ["watch"]
image: mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION:-10.0}-alpine
working_dir: /src
volumes:
- .:/src
- nuget-cache:/root/.nuget/packages
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ${XAUTHORITY:-${HOME}/.Xauthority}:/root/.Xauthority:ro
environment:
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
DOTNET_NOLOGO: "1"
DOTNET_WATCH_RESTART_ON_RUDE_EDIT: "true"
DISPLAY: ${DISPLAY:-:0}
XAUTHORITY: /root/.Xauthority
network_mode: host
entrypoint:
- dotnet
- watch
- run
- --project
- src/VoxForge.App
shell:
profiles: ["dev"]
image: mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION:-10.0}-alpine
working_dir: /src
volumes:
- .:/src
- nuget-cache:/root/.nuget/packages
environment:
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
DOTNET_NOLOGO: "1"
entrypoint: ["/bin/sh"]
stdin_open: true
tty: true
volumes:
nuget-cache: