forked from AerinIT/voting-application
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (62 loc) · 1.57 KB
/
docker-compose.yml
File metadata and controls
68 lines (62 loc) · 1.57 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
version: '3'
services:
# A postgres DB used to store data by the API server microservice.
voting-app-database:
image: postgres:14.5
container_name: voting-app-database
restart: always
environment:
POSTGRES_PASSWORD: "postgres"
volumes:
- "postgres:/var/lib/postgresql/data"
ports:
- "5432:5432"
networks:
- voting-app-network
# The API server microservice.
# It writes logs directly to the Loki service, exposes metrics for the Prometheus
# service and sends traces to the Grafana Alloy instance.
voting-app-server:
build:
context: ./voting-App-Server
container_name: voting-app-server
restart: always
ports:
- "5000:5000"
depends_on:
- voting-app-database
environment:
- NAMESPACE=production
- LOGS_TARGET=http://alloy:3100/loki/api/v1/push
- TRACING_COLLECTOR_HOST=alloy
- TRACING_COLLECTOR_PORT=4317
- OTEL_EXPORTER_OTLP_TRACES_INSECURE=true
- OTEL_RESOURCE_ATTRIBUTES=ip=1.2.3.5
networks:
- voting-app-network
voting-app-client:
build:
context: ./voting-App-Client
container_name: voting-app-client
restart: always
ports:
- "3001:3001"
networks:
- voting-app-network
nginx:
image: nginx:alpine
container_name: voting-app-nginx
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- voting-app-client
- voting-app-server
networks:
- voting-app-network
networks:
voting-app-network:
driver: bridge
volumes:
postgres: