-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
120 lines (111 loc) · 2.86 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
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
version: "3.7"
services:
sf4d-h2-proxy:
# Don't use this proxy in prod
build:
context: ./
dockerfile: docker/dev/h2-proxy/Dockerfile
container_name: sf4d-h2-proxy
hostname: sf4d-h2-proxy
depends_on:
- sf4d-nginx
ports:
- "80:80"
- "443:443"
volumes:
- "./volumes/$APP_NAME/http2-proxy:/var/log/nginx"
sf4d-nginx:
build:
context: ./
dockerfile: docker/dev/nginx/Dockerfile
args:
WORKDIR: ${WORKDIR:-var/www}
APP_NAME: ${APP_NAME:-app.test}
container_name: sf4d-nginx
hostname: sf4d-nginx
restart: on-failure
depends_on:
- sf4d-php-fpm
ports:
- "${NGINX_LOCAL_PORT:-81}:80"
volumes:
- "./apps/$APP_NAME/public:/${WORKDIR}/${APP_NAME}/public"
- "./volumes/$APP_NAME/nginx/logs:/var/log/nginx:rw"
sf4d-php-fpm:
build:
context: ./
dockerfile: docker/dev/php/7.3/fpm/Dockerfile
args:
TIMEZONE: ${TIMEZONE:-UTC}
WORKDIR: ${WORKDIR:-var/www}
APP_NAME: ${APP_NAME:-app.test}
container_name: sf4d-php-fpm
hostname: sf4d-php-fpm
volumes:
- "./apps/$APP_NAME:/$WORKDIR/$APP_NAME"
- "./volumes/$APP_NAME/php/var/cache:/$WORKDIR/$APP_NAME/var/cache:rw"
- "./volumes/$APP_NAME/php/var/sessions:/$WORKDIR/$APP_NAME/var/sessions:rw"
- "./volumes/$APP_NAME/php/var/logs:/$WORKDIR/$APP_NAME/var/logs:rw"
depends_on:
- sf4d-db
- sf4d-redis
#user: ${LOCAL_USER}
sf4d-php-cli:
build:
context: ./
dockerfile: docker/dev/php/7.3/cli/Dockerfile
args:
TIMEZONE: ${TIMEZONE:-UTC}
WORKDIR: ${WORKDIR:-var/www}
APP_NAME: ${APP_NAME:-app.test}
container_name: sf4d-php-cli
hostname: sf4d-php-cli
volumes:
- ./apps/$APP_NAME:/$WORKDIR/$APP_NAME
- composer:/root/.composer/cache:rw
links:
- sf4d-db
- sf4d-redis
#user: ${LOCAL_USER}
tty: true
sf4d-db:
image: postgres:11.2-alpine
container_name: sf4d-db
hostname: sf4d-db
restart: on-failure
environment:
POSTGRES_USER: ${POSTGRES_USER:-symfonist}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-secret}
POSTGRES_DB: ${POSTGRES_DB:-app_db}
ports:
- "${POSTGRES_LOCAL_PORT:-54321}:5432"
volumes:
- db-data:/var/lib/postgresql/data:rw
sf4d-adminer:
image: adminer
container_name: sf4d-adminer
hostname: sf4d-adminer
restart: always
links:
- sf4d-db
ports:
- '${ADMINER_LOCAL_PORT:-8080}:8080'
sf4d-redis:
image: redis:5-alpine
container_name: sf4d-redis
hostname: sf4d-redis
ports:
- "6379:6379"
volumes:
- redis:/data
command:
- 'redis-server'
- '--databases 2'
- '--save 900 1'
- '--save 300 10'
- '--save 60 10000'
- '--requirepass secret'
volumes:
db-data:
redis:
composer: