-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
111 lines (111 loc) · 2.78 KB
/
docker-compose.yaml
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
version: "3.7"
services:
LocPlaceBot:
build: .
image: kozalosev/locplacebot
container_name: locplacebot
restart: unless-stopped
environment:
- TELOXIDE_TOKEN
- GOOGLE_MAPS_API_KEY
- YANDEX_MAPS_GEOCODER_API_KEY
- YANDEX_MAPS_PLACES_API_KEY
- RUST_LOG
- CACHE_TIME
- GAPI_MODE
- YAPI_MODE
- MSG_LOC_LIMIT
- WEBHOOK_URL
- REDIS_HOST
- REDIS_PORT
- REDIS_PASSWORD
- REQUESTS_LIMITER_MAX_ALLOWED
- REQUESTS_LIMITER_TIMEFRAME
- GRPC_ADDR_USER_SERVICE
- USER_CACHE_TIME_SECS
- CACHE_CLEAN_UP_INTERVAL_SECS
- SEARCH_RADIUS_METERS
- QUERY_CHECK_MODE
expose:
- 8080
networks:
- redis-network
- user-service-network
labels:
- "com.centurylinklabs.watchtower.enable=true"
logging:
driver: local
redis:
image: redis:6.2-alpine
container_name: locplacebot-redis
environment:
- REDIS_PORT
- REDIS_PASSWORD
- REDISCLI_AUTH=${REDIS_PASSWORD}
healthcheck:
test: [ "CMD-SHELL", "redis-cli -p $$REDIS_PORT -a $$REDIS_PASSWORD ping" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
expose:
- ${REDIS_PORT}
command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD:?error} --port ${REDIS_PORT}
volumes:
- ./data/redis:/data
logging:
driver: local
networks:
- redis-network
user-service:
image: ghcr.io/kozalo-blog/user-service
container_name: locplacebot-user-service
restart: unless-stopped
environment:
- RUST_LOG
- DATABASE_URL=postgres://${POSTGRES_USER:?error}:${POSTGRES_PASSWORD:?error}@${POSTGRES_HOST:?error}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:?error}
- DATABASE_MAX_CONNECTIONS
expose:
- 8080
- 8090
networks:
- postgres-network
- user-service-network
labels:
- "com.centurylinklabs.watchtower.enable=true"
logging:
driver: local
depends_on:
- postgres
postgres:
image: postgres:14.5-alpine
container_name: locplacebot-user-service-postgres
environment:
- POSTGRES_PORT
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- PGDATA=/var/lib/postgresql/data/pgdata
expose:
- ${POSTGRES_PORT}
volumes:
- ./data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
networks:
- postgres-network
logging:
driver: local
networks:
postgres-network:
driver: bridge
redis-network:
driver: bridge
user-service-network:
driver: bridge