-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
124 lines (115 loc) · 2.54 KB
/
docker-compose.yaml
File metadata and controls
124 lines (115 loc) · 2.54 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
services:
postgres:
image: postgres:latest
container_name: postgres-db
restart: unless-stopped
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=yourpassword
- POSTGRES_DB=fake_id
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
networks:
- app-network
redis:
image: redis:alpine
container_name: redis
restart: unless-stopped
volumes:
- redis-data:/data
command: redis-server --appendonly yes
networks:
- app-network
zookeeper:
image: confluentinc/cp-zookeeper:latest
container_name: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
networks:
- app-network
restart: unless-stopped
kafka:
image: confluentinc/cp-kafka:latest
container_name: kafka
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
networks:
- app-network
restart: unless-stopped
auth-service:
build:
context: ./auth-service
dockerfile: Dockerfile
platform: linux/amd64
expose:
- "8080"
environment:
- DB_HOST=postgres
- REDIS_ADDR=redis
- JWT_SECRET=${JWT_SECRET}
env_file:
- auth-service/config/.env
networks:
- app-network
depends_on:
- postgres
- redis
restart: unless-stopped
api-gateway:
image: nginx:latest
ports:
- "26200:26200"
volumes:
- ./api-gateway/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./api-gateway/nginx/certs:/etc/nginx/certs:ro
depends_on:
- frontend
networks:
- app-network
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
volumes:
- ./frontend:/app
- /app/node_modules
networks:
- app-network
task-service:
build:
context: ./task-service
dockerfile: Dockerfile
platform: linux/amd64
expose:
- "8080"
environment:
- JWT_SECRET=${JWT_SECRET}
env_file:
- task-service/config/.env
depends_on:
- postgres
- redis
- kafka
networks:
- app-network
restart: unless-stopped
networks:
app-network:
driver: bridge
volumes:
postgres-data:
driver: local
redis-data:
driver: local