-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdocker-compose.yml
143 lines (134 loc) · 3.01 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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
networks:
tenant:
driver: bridge
volumes:
mysql-data:
name: mysql-data
driver: local
postgres_data_evolution:
name: postgres_data_evolution
driver: local
evolution_instances_data:
driver: local
services:
app:
build:
context: .
args:
user: ${USER:-wallace}
uid: ${UID:-1000}
dockerfile: Dockerfile
working_dir: /var/www/
volumes:
- ./:/var/www/
restart: unless-stopped
depends_on:
- redis
- queue
- mysql
networks:
- tenant
queue:
build:
context: .
args:
user: ${USER:-wallace}
uid: ${UID:-1000}
dockerfile: Dockerfile
restart: always
command: ["php", "artisan", "queue:work", "--sleep=3", "--tries=3"]
volumes:
- ./:/var/www
depends_on:
- mysql
networks:
- tenant
nginx:
image: nginx:alpine
restart: always
ports:
- 80:80
volumes:
- ./:/var/www
- ./docker/nginx/:/etc/nginx/conf.d/
networks:
- tenant
mysql:
image: mysql:latest
restart: always
ports:
- 3307:3306
volumes:
- mysql-data:/var/lib/mysql
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
LANG: C.UTF-8
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
networks:
- tenant
redis:
image: redis:latest
ports:
- 6379:6379
networks:
- tenant
mailpit:
image: axllent/mailpit:latest
restart: on-failure
tty: true
ports:
- 1025:1025 # SMTP server
- 8025:8025 # Web UI
networks:
- tenant
evolution:
container_name: evolution-api
image: atendai/evolution-api:v2.2.2
build:
context: .
dockerfile: Dockerfile.evolution
restart: always
env_file:
- .env
environment:
DATABASE_PROVIDER: postgresql
DATABASE_CONNECTION: pgsql
DATABASE_CONNECTION_URI: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres-db-evolution:${POSTGRES_PORT}/evolution
ports:
- "8080:8080"
networks:
- tenant
volumes:
- evolution_instances_data:/evolution/instances
postgres:
container_name: postgres-db-evolution
build:
context: .
dockerfile: Dockerfile.postgresSql
restart: unless-stopped
environment:
PGDATA: /var/lib/postgresql/data
LANG: C.UTF-8
env_file:
- .env
ports:
- "5432:5432"
networks:
- tenant
volumes:
- ./docker/postgres/postgresql.conf:/etc/postgresql/postgresql.conf
- postgres_data_evolution:/var/lib/postgresql/data
- ./docker/postgres/init:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5