Repository navigation
Expand file tree
/
Copy pathcompose.yml
More file actions
102 lines (96 loc) · 2.52 KB
/
Copy pathcompose.yml
File metadata and controls
102 lines (96 loc) · 2.52 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
98
99
100
101
102
volumes:
cache:
services:
volume-init:
image: busybox:1.37.0-musl
user: root
volumes:
- cache:/cache
command:
- sh
- -c
- |
mkdir -p /cache/go-build
mkdir -p /cache/go-mod
mkdir -p /cache/golangci-lint
mkdir -p /cache/npm
chown -R ${FIXUID:-1000}:${FIXGID:-1000} /cache
go-builder:
profiles: ["build"]
user: ${FIXUID:-1000}:${FIXGID:-1000}
build:
context: .
dockerfile: Dockerfile
target: builder-download
environment:
GOCACHE: /cache/go-build
GOMODCACHE: /cache/go-mod
depends_on:
volume-init:
condition: service_completed_successfully
volumes:
- .:/src
- cache:/cache
go-binary:
profiles: ["build"]
user: ${FIXUID:-1000}:${FIXGID:-1000}
build:
context: .
dockerfile: Dockerfile
target: export
environment:
GOCACHE: /cache/go-build
GOMODCACHE: /cache/go-mod
depends_on:
volume-init:
condition: service_completed_successfully
volumes:
- cache:/cache
goreleaser:
profiles: ["build"]
user: ${FIXUID:-1000}:${FIXGID:-1000}
# Latest version: https://hub.docker.com/r/goreleaser/goreleaser/tags
image: goreleaser/goreleaser:v2.18.1
working_dir: /src
environment:
GOCACHE: /cache/go-build
GOMODCACHE: /cache/go-mod
# The image pins GOTOOLCHAIN=local; auto keeps go.mod the single toolchain
# pin, so bumping it does not also mean finding a goreleaser image to match.
GOTOOLCHAIN: auto
depends_on:
volume-init:
condition: service_completed_successfully
volumes:
- .:/src
- cache:/cache
node:
profiles: ["markdown"]
user: ${FIXUID:-1000}:${FIXGID:-1000}
# Latest version: https://hub.docker.com/_/node/tags
image: node:24.15.0-bookworm
working_dir: /src
environment:
NPM_CONFIG_CACHE: /cache/npm
depends_on:
volume-init:
condition: service_completed_successfully
volumes:
- .:/src
- cache:/cache
golangci-lint:
profiles: ["lint"]
user: ${FIXUID:-1000}:${FIXGID:-1000}
# Latest version: https://hub.docker.com/r/golangci/golangci-lint/tags
image: golangci/golangci-lint:v2.12.2-alpine
working_dir: /src
environment:
GOCACHE: /cache/go-build
GOMODCACHE: /cache/go-mod
GOLANGCI_LINT_CACHE: /cache/golangci-lint
depends_on:
volume-init:
condition: service_completed_successfully
volumes:
- .:/src
- cache:/cache