-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (49 loc) · 1.33 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
version: '3'
services:
# redis
redis:
image: redis:alpine
volumes:
- ./db/redis/:/data/redis
# database
database:
image: postgres:${POSTGRES_VERSION:-13}-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-app}
# You should definitely change the password in production
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-ChangeMe}
POSTGRES_USER: ${POSTGRES_USER:-symfony}
volumes:
- db-data:/var/lib/postgresql/data:rw
ports:
- "5432:5432"
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/db/data:/var/lib/postgresql/data:rw
# php app
app:
build: .
tty: true
depends_on:
- database
- redis
links:
- database
- redis
volumes:
#- ./docker/php/conf.d/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- ./docker/php/conf.d/error_reporting.ini:/usr/local/etc/php/conf.d/error_reporting.ini
- ./docker/supervisor/messenger-worker.conf:/etc/supervisor/conf.d/messenger-worker.conf
- .:/app
web:
image: nginx:latest
ports:
- "80:80"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- .:/app
php:
image: php:fpm
volumes:
- .:/app
volumes:
db-data: