forked from gmagmeg/book-frankenphp-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
52 lines (49 loc) · 1.27 KB
/
compose.yaml
File metadata and controls
52 lines (49 loc) · 1.27 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
name: book-frankenphp
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: book-frankenphp-app
ports:
- "${APP_PORT:-8000}:${APP_PORT:-8000}"
env_file:
- path: .env
required: false
environment:
CHOKIDAR_USEPOLLING: "1"
DB_CONNECTION: pgsql
DB_HOST: db
DB_PORT: 5432
DB_DATABASE: ${DB_DATABASE:-laravel}
DB_USERNAME: ${DB_USERNAME:-laravel}
DB_PASSWORD: ${DB_PASSWORD:-secret}
volumes:
- ./:/app
- caddy_data:/data
depends_on:
db:
condition: service_healthy
restart: unless-stopped
db:
image: postgres:17-alpine
container_name: book-frankenphp-db
ports:
- "${FORWARD_DB_PORT:-5432}:5432"
environment:
POSTGRES_DB: ${DB_DATABASE:-laravel}
POSTGRES_USER: ${DB_USERNAME:-laravel}
POSTGRES_PASSWORD: ${DB_PASSWORD:-secret}
volumes:
- book_frankenphp_pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME:-laravel} -d ${DB_DATABASE:-laravel}"]
interval: 5s
timeout: 3s
retries: 10
restart: unless-stopped
volumes:
book_frankenphp_pg_data:
name: book-frankenphp-pg-data
caddy_data:
name: book-frankenphp-caddy-data