-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
83 lines (78 loc) · 1.85 KB
/
docker-compose.prod.yml
File metadata and controls
83 lines (78 loc) · 1.85 KB
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
services:
app:
build:
context: .
dockerfile: docker/php/Dockerfile
container_name: boleto-inter-pro-app
restart: unless-stopped
working_dir: /var/www/html
volumes:
- ./:/var/www/html
- ./docker/php/php.ini:/usr/local/etc/php/conf.d/custom.ini
networks:
- boleto-network
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_started
env_file:
- .env
environment:
- DB_HOST=mysql
- DB_PORT=3306
- REDIS_HOST=redis
- REDIS_PORT=6379
nginx:
build:
context: .
dockerfile: docker/nginx/Dockerfile
container_name: boleto-inter-pro-nginx
restart: unless-stopped
ports:
- "8080:80"
- "8443:443"
volumes:
- ./:/var/www/html
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
networks:
- boleto-network
depends_on:
- app
mysql:
image: mysql:5.7
container_name: boleto-inter-pro-mysql
restart: unless-stopped
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: ${DB_DATABASE:-boleto_inter_pro}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-root}
MYSQL_USER: ${DB_USERNAME:-boleto_user}
MYSQL_PASSWORD: ${DB_PASSWORD:-boleto_pass}
volumes:
- mysql_data:/var/lib/mysql
networks:
- boleto-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${DB_PASSWORD:-root}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: boleto-inter-pro-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- boleto-network
command: redis-server --appendonly yes
networks:
boleto-network:
driver: bridge
volumes:
mysql_data:
redis_data: