-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
130 lines (121 loc) · 2.95 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
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
services:
dock-test-api:
depends_on:
- postgres
- database-migration
- redis
- otel-collector
image: dock-test-api:latest
build:
dockerfile: ./Dockerfile
context: .
target: build-local
container_name: dock-test-api
restart: unless-stopped
networks:
- current
ports:
- "8080:8080"
volumes:
- ".:/code"
environment:
DATABASE_URL: "$DATABASE_URL"
REDIS_URL: "$REDIS_URL"
OTEL_COLLECTOR_HOST: "$OTEL_COLLECTOR_HOST"
ENVIRONMENT: "$ENVIRONMENT"
SERVICE: "$SERVICE"
VERSION: "$VERSION"
HTTP_HOST: "$HTTP_HOST"
PORT: "$PORT"
DEBUG_PPROF: "$DEBUG_PPROF"
command: "go run ./cmd/api/main.go"
postgres:
image: postgres:13-alpine
container_name: postgres
restart: unless-stopped
networks:
- current
ports:
- "5432:5432"
command: [ "postgres", "-c", "log_statement=all", "-c", "log_destination=stderr" ]
environment:
POSTGRES_USER: dock-test
POSTGRES_PASSWORD: dock-test
POSTGRES_DB: dock-test
database-migration:
image: migrate/migrate
container_name: database-migration
restart: on-failure
depends_on:
- postgres
networks:
- current
volumes:
- ".:/code"
command: [ "-path", "/code/migrations/", "-database", "$DATABASE_URL", "up" ]
redis:
image: redis:6
container_name: redis
restart: unless-stopped
networks:
- current
command: redis-server --save 60 1 --requirepass MDNcVb924a
ports:
- '6379:6379'
redis-commander:
image: rediscommander/redis-commander:latest
restart: unless-stopped
container_name: redis-commander
depends_on:
- redis
environment:
REDIS_HOSTS: redis
REDIS_HOST: redis
REDIS_PORT: redis:6379
REDIS_PASSWORD: "MDNcVb924a"
HTTP_USER: root
HTTP_PASSWORD: root
networks:
- current
ports:
- 8081:8081
otel-collector:
image: otel/opentelemetry-collector:latest
container_name: otel-collector
restart: unless-stopped
command: [ "--config=/conf/otel-collector-config.yml", "--log-level=DEBUG" ]
volumes:
- ./otel-collector-config.yml:/conf/otel-collector-config.yml
ports:
- "9464:9464"
- "55680:55680"
- "55681:55681"
networks:
- current
depends_on:
- jaeger
- prometheus
jaeger:
image: jaegertracing/all-in-one
container_name: jaeger
restart: unless-stopped
networks:
- current
ports:
- "14268:14268" # jaeger-collector HTTP server (tracer provider)
- "14250"
- "16686:16686" # HTTP server (browser UI)
# Prometheus
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
networks:
- current
ports:
- "9090:9090"
networks:
current:
name: current