-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
77 lines (72 loc) · 1.95 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
version: "3.9"
services:
php:
container_name: dc-php
build:
context: .
dockerfile: docker/php/Dockerfile
volumes:
- ./:/app
- ./docker/supervisor.conf:/etc/supervisor/conf.d/server.conf:ro
networks:
- app-network
ports:
- ${APP_PORT}:8092
- ${DEV_SERVER_PORT}:5173
restart: on-failure
depends_on:
- redis
- mariadb
mariadb:
container_name: dc-mariadb
image: mariadb:10.11.2
volumes:
- app-database-volume:/var/lib/mysql
- ./docker/database:/docker-entrypoint-initdb.d:ro
- ./docker/database/conf:/etc/mysql/conf.d:ro
networks:
- app-network
environment:
- MARIADB_USER=${DB_USERNAME}
- MARIADB_PASSWORD=${DB_PASSWORD}
- MARIADB_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- MARIADB_DATABASE=${DB_DATABASE}
ports:
- ${DB_PORT}:3306
restart: always
healthcheck:
test: [ "CMD", "mariadb-admin", "--protocol", "tcp" ,"ping" ]
timeout: 3m
interval: 10s
retries: 10
redis:
container_name: dc-redis
image: redis:7.0.9
ports:
- ${REDIS_PORT}:6379
restart: always
volumes:
- app-redis-volume:/data
networks:
- app-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
retries: 3
timeout: 5s
mailhog:
container_name: dc-mailhog
image: mailhog/mailhog:v1.0.1
ports:
- ${MAIL_PORT}:1025
- ${MAILHOG_HTTP_PORT}:8025
restart: always
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
app-database-volume:
driver: local
app-redis-volume:
driver: local