-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
70 lines (67 loc) · 1.41 KB
/
docker-compose.yml
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
services:
hoteler:
build:
context: ./
dockerfile: Dockerfile
container_name: hoteler
restart: always
ports:
- 8443:8443
volumes:
- ./application-docker.yml:/app/config/application.yml
networks:
- hoteler-network
env_file: .env
# links:
# - db
depends_on:
- db
- pgbouncer
- redis
db:
image: postgres:17.2-alpine3.20
container_name: db
ports:
- 5432:5432
volumes:
- hoteler-volume:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 123456
POSTGRES_DB: postgres
networks:
- hoteler-network
pgbouncer:
image: edoburu/pgbouncer:v1.23.1-p0
container_name: "pgbouncer"
environment:
- DATABASE_URL=postgres://postgres:123456@db:5432/postgres
- POOL_MODE=session
- MAX_DB_CONNECTIONS=100
- DEFAULT_POOL_SIZE=40
- AUTH_TYPE=scram-sha-256
depends_on:
- db
ports:
- 6543:5432
networks:
- hoteler-network
restart: on-failure
redis:
image: redis:7.4.1-alpine3.20
container_name: "redis"
ports:
- 6379:6379
networks:
- hoteler-network
restart: unless-stopped
volumes:
- hoteler-redis-volume:/data/redis
volumes:
hoteler-volume:
external: true
hoteler-redis-volume:
external: true
networks:
hoteler-network:
external: true