-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yml
82 lines (74 loc) · 1.56 KB
/
docker-compose-dev.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
volumes:
rinha:
services:
app01: &app
container_name: php-swoole-latest
build:
context: ./container/php/
hostname: app01
networks:
rede_app:
aliases:
- app01
environment:
AUTORELOAD_PROGRAMS: "swoole"
AUTORELOAD_ANY_FILES: 1
depends_on:
- db
volumes:
- type: bind
source: .
target: /var/www/
deploy:
resources:
limits:
cpus: '0.6'
memory: '150MB'
# 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-dev.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: "360MB"
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