This repository has been archived by the owner on Dec 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
135 lines (133 loc) · 2.51 KB
/
docker-compose.yaml
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
version: "3.8"
services:
mailhog:
image: docker.io/mailhog/mailhog:v1.0.1
restart: on-failure
env_file:
- .env
networks:
- mail
ports:
- 8025:8025
redis:
image: docker.io/library/redis:6.2.4-alpine3.13
restart: on-failure
env_file:
- .env
healthcheck:
test:
- CMD-SHELL
- redis-cli PING || exit 1
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
networks:
- queue
ports:
- 6379:6379
volumes:
- "redis_data:/data"
mariadb:
build:
context: ./
dockerfile: ./docker/mariadb/Dockerfile
restart: on-failure
env_file:
- .env
healthcheck:
test:
- "CMD"
- "mysqladmin"
- "ping"
- "--user=$MYSQL_USER"
- "--password=$MYSQL_PASSWORD"
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
ports:
- 3306:3306
volumes:
- "mariadb_data:/var/lib/mysql"
postgres:
image: docker.io/library/postgres:12.7-alpine
restart: on-failure
env_file:
- .env
healthcheck:
test:
- "CMD-SHELL"
- "pg_isready -U $POSTGRES_USER"
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
networks:
- database
ports:
- 5432:5432
volumes:
- "postgres_data:/var/lib/postgresql/data"
node:
build:
context: ./
dockerfile: ./docker/node/Dockerfile
command:
- npm
- run
- watch
volumes:
- ./:/srv/app:Z
php:
build:
context: ./
dockerfile: ./docker/php-fpm/Dockerfile
environment:
APP_ENV: dev
depends_on:
- mailhog
- redis
- postgres
- node
networks:
- application
- database
- mail
- queue
volumes:
- ./:/srv/app:Z
# Use this to bring in your personal composer settings
- "~/.config/composer:/root/.config/composer:Z"
nginx:
build:
context: ./
dockerfile: ./docker/nginx/Dockerfile
depends_on:
- php
networks:
- application
ports:
- "8080:80"
- "8443:443"
volumes:
- ./docker/nginx/conf.d:/etc/nginx/conf.d:ro
- ./public:/srv/app/public:Z
networks:
application:
database:
mail:
queue:
volumes:
redis_data:
driver: local
mariadb_data:
driver: local
postgres_data:
driver: local
symfony_cache:
driver: local
webpack_assets:
driver: local
bundle_assets:
driver: local