-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·49 lines (45 loc) · 1 KB
/
docker-compose.yml
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
services:
go:
build:
context: .
target: base
args:
USER_ID: ${USER_ID:-1000}
volumes:
- .:/go/src/app
- ~/go/pkg:/go/pkg
env_file: .env
ports:
- ${HTTP_PORT:-8000}:${HTTP_PORT:-8000}
- ${DELVE_PORT:-2345}:${DELVE_PORT:-2345}
depends_on:
- cockroachdb
- redis
tty: true
cockroachdb:
image: cockroachdb/cockroach:v24.3.1
command: start-single-node --insecure
ports:
- ${COCKROACHDB_PORT:-26257}:26257
- ${COCKROACHDB_CONSOLE_PORT:-8080}:8080
volumes:
- cockroachdb_storage:/cockroach/cockroach-data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health?ready=1"]
interval: 3s
timeout: 3s
retries: 3
redis:
image: redis:7.4.1-alpine
command:
- redis-server
- --appendonly
- 'yes'
user: redis
volumes:
- redis_storage:/data
ports:
- ${REDIS_PORT:-6379}:6379
volumes:
cockroachdb_storage:
redis_storage: