-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
82 lines (75 loc) · 1.61 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
71
72
73
74
75
76
77
78
79
80
81
82
version: '3.1'
networks:
rede_app:
driver: bridge
services:
app01: &app
image: shenkimaro/php8.3-postgres
hostname: app01
networks:
rede_app:
aliases:
- app01
environment:
- DB_HOSTNAME=db
- PORT=9000
depends_on:
- db
volumes:
- type: bind
source: .
target: /var/www/html/
- type: bind
source: container/php/www.conf
target: /usr/local/etc/php-fpm.d/www.conf #testar configuraçao de fpm
deploy:
resources:
limits:
cpus: '0.3'
memory: '175MB'
app02:
<<: *app
hostname: app02
nginx:
image: nginx
restart: always
networks:
- rede_app
ports:
- 9999:80
depends_on:
- app01
- app02
deploy:
resources:
limits:
cpus: "0.4"
memory: "40MB"
volumes:
- type: bind
source: ./container/nginx/nginx.conf
target: /etc/nginx/nginx.conf
db:
image: postgres
restart: always
hostname: db
networks:
rede_app:
aliases:
- db
environment:
POSTGRES_PASSWORD: teste
ports:
- 5433:5432
deploy:
resources:
limits:
cpus: "0.5"
memory: "160MB"
volumes:
- rinha:/var/lib/postgresql/datas
- ./container/script.sql:/docker-entrypoint-initdb.d/init.sql
- ./container/postgres/postgresql.conf:/usr/share/postgresql/16/postgresql.conf
command: postgres -c checkpoint_timeout=600 -c max_wal_size=4096 -c synchronous_commit=0 -c full_page_writes=0
volumes:
rinha: