-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
66 lines (61 loc) · 1.31 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
version: '3.8'
x-cache-from:
- &app-cache-from
cache_from:
- php:8.0-fpm
services:
db:
image: postgres:13-alpine
restart: always
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: db
POSTGRES_USER: postgres
volumes:
- db-data:/var/lib/postgresql/data:rw
ports:
- target: 5432
published: 5432
protocol: tcp
php:
image: php:8.0-fpm
build:
context: ./docker/php-fpm
<<: *app-cache-from
depends_on:
- db
environment:
- APP_ENV=${APP_ENV}
- APP_SECRET=${APP_SECRET}
- DATABASE_URL=${DATABASE_URL}
healthcheck:
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
volumes:
- ./docker/php-fpm/custom-dev.ini:/usr/local/etc/php/conf.d/custom.ini
- ./:/var/www
- app-cache:/var/www/var
nginx:
build:
context: ./docker/nginx
volumes:
- ./:/var/www
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./docker/nginx/sites/:/etc/nginx/sites-available
- ./docker/nginx/conf.d/:/etc/nginx/conf.d
- ./docker/logs:/var/log
depends_on:
- php
ports:
- "80:80"
- "443:443"
adminer:
image: adminer
restart: always
ports:
- 8080:8080
volumes:
db-data:
app-cache: