38 lines
843 B
YAML
38 lines
843 B
YAML
services:
|
|
test:
|
|
image: golang:1.26
|
|
environment:
|
|
CGO_ENABLED: 1
|
|
NEO4J_USER: neo4j
|
|
NEO4J_PASS: heartwood
|
|
NEO4J_URI: bolt://neo4j:7687
|
|
working_dir: /app
|
|
volumes:
|
|
- ".:/app"
|
|
- go-mod-cache:/go/pkg/mod
|
|
- go-build-cache:/root/.cache/go-build
|
|
depends_on:
|
|
neo4j:
|
|
condition: service_healthy
|
|
restart: always
|
|
command: "tail -f /dev/null"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "go version | grep -q 'go version'"]
|
|
start_period: 20s
|
|
neo4j:
|
|
image: neo4j:5
|
|
environment:
|
|
- NEO4J_AUTH=neo4j/heartwood
|
|
restart: always
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"cypher-shell -u neo4j -p heartwood 'RETURN 1;' 2>/dev/null | grep -q '1'",
|
|
]
|
|
start_period: 20s
|
|
|
|
volumes:
|
|
go-mod-cache:
|
|
go-build-cache:
|