-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
63 lines (59 loc) · 1.27 KB
/
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
services:
php:
build: .docker/php
container_name: php
environment:
- DB_HOST=postgresql_db
- DB_DATABASE=laravel-ddd
- DB_USERNAME=postgres
- DB_PASSWORD=postgres
ports:
- 5173:5173
volumes:
- .:/var/www:cached
depends_on:
postgresql:
condition: service_healthy
restart: true
nginx:
condition: service_started
networks:
- app-network
nginx:
container_name: nginx
image: nginx
ports:
- 80:80
volumes:
- .:/var/www
- .docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
- .docker/nginx/nginx.conf:/etc/nginx/nginx.conf
networks:
- app-network
postgresql:
container_name: postgresql_db
image: postgres:14.3-alpine
tty: true
restart: always
environment:
- POSTGRES_DB=laravel-ddd
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- 5432:5432
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- app-network
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -d laravel-ddd" ]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
networks:
app-network:
driver: bridge
volumes:
pgdata:
driver: local