-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
59 lines (55 loc) · 1.29 KB
/
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
# ⚠️ Only for development! Use kubernetes in production
networks:
usmile:
driver: bridge
services:
bot-dev:
container_name: usmile-dev
build:
context: .
dockerfile: Dockerfile.dev
env_file: .env
environment:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
REDIS_HOST: redis
LOCAL: true
networks:
- usmile
volumes:
- ./src:/usr/src/app/src
- ./certs:/usr/src/app/certs
restart: no
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
postgres:
image: postgres:17.4-alpine
container_name: usmile-postgres
networks:
- usmile
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: usmile
volumes:
- ./pg_data:/var/lib/postgresql/data
restart: always
healthcheck:
test: pg_isready --username=$$POSTGRES_USER --dbname usmile
start_period: 10s
start_interval: 1s
redis:
image: redis:7.4.2-alpine
container_name: usmile-redis
networks:
- usmile
volumes:
- ./redis_data:/data
restart: always
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
start_period: 10s
start_interval: 1s