-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
117 lines (109 loc) · 2.86 KB
/
docker-compose.yml
File metadata and controls
117 lines (109 loc) · 2.86 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
version: '3.8'
services:
# https://vinybrasil.github.io/portfolio/kafkafastapiasync/
zookeeper:
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: ${ZOOKEEPER_CLIENT_PORT}
ZOOKEEPER_TICK_TIME: ${ZOOKEEPER_TICK_TIME}
ports:
- ${ZOOKEEPER_CLIENT_PORT}:${ZOOKEEPER_CLIENT_PORT}
networks:
zookeeper-kafka:
# https://vinybrasil.github.io/portfolio/kafkafastapiasync/
kafka:
image: confluentinc/cp-kafka:latest
depends_on:
- zookeeper
ports:
- ${KAFKA_PORT}:29092
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:${ZOOKEEPER_CLIENT_PORT}
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
networks:
zookeeper-kafka:
postgres-db:
image: postgres
ports:
- "${DB_EXTERNAL_PORT}:5432"
environment:
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_DATABASE}
- POSTGRES_HOST=${DB_HOST}
volumes:
- ~/Volumes/postgresql:/var/lib/postgresql/data
networks:
- db-backend
- backend-frontend
backend:
build: ./backend
command: uvicorn api.server:app --host 0.0.0.0 --reload
volumes:
- ./backend:/code
env_file:
- .env
ports:
- "${BACKEND_PORT}:8000"
restart: on-failure
depends_on:
- postgres-db
- kafka
networks:
- db-backend
- backend-frontend
- zookeeper-kafka
task-checker:
build: ./TaskChecker
command: python3 main.py
volumes:
- ./TaskChecker:/code
- /var/run/docker.sock:/var/run/docker.sock
env_file:
- .env
networks:
- db-backend
- zookeeper-kafka
frontend:
build:
context: ./frontend
env_file:
- .env
environment:
- REACT_APP_PROD_SITE_URL=${REACT_APP_PROD_SITE_URL}
- REACT_APP_DEV_SITE_URL=${REACT_APP_DEV_SITE_URL}
- REACT_APP_PROD_API_URL=${REACT_APP_PROD_API_URL}
- REACT_APP_DEV_API_URL=${REACT_APP_DEV_API_URL}
- REACT_APP_PROD_VK_CLIENT_ID=${REACT_APP_PROD_VK_CLIENT_ID}
- REACT_APP_DEV_VK_CLIENT_ID=${REACT_APP_DEV_VK_CLIENT_ID}
- REACT_APP_SECRET=${REACT_APP_SECRET}
ports:
- 10443:443
volumes:
- ./frontend:/usr/src/app
- /usr/src/app/node_modules
networks:
- backend-frontend
- frontend-services
tty: true
stdin_open: true
depends_on:
- backend
- auth
auth:
build:
context: ./auth-frontend
ports:
- 3340:3340
stdin_open: true
networks:
- frontend-services
networks:
db-backend:
backend-frontend:
frontend-services:
zookeeper-kafka: