-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml
55 lines (55 loc) · 1.38 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
version: '2'
services:
nginx:
image: library/nginx:1.23.2-alpine
container_name: default-structure-nginx
restart: always
volumes:
- ./public:/var/www/public
- ./nginx.develop.conf:/etc/nginx/nginx.conf
ports:
- 22777:22777
depends_on:
- app
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
app:
build:
context: .
args:
- COMPOSER_FLAGS=--prefer-dist --optimize-autoloader
command: /usr/local/sbin/php-fpm
container_name: default-structure-app
restart: always
user: $DOCKER_USER
ports:
- 18080:18080
- 9000:9000
environment:
- OPCACHE_SAVE_COMMENTS=0
- OPCACHE_VALIDATE_TIMESTAMPS=1
- OPCACHE_REVALIDATE_FREQ=0
volumes:
- .:/var/www
- ./php.ini:/usr/local/etc/php/php.ini
- ./www.conf:/usr/local/etc/php-fpm.d/www.conf
depends_on:
- pgsql
- redis
pgsql:
image: library/postgres:14.6-alpine
container_name: default-structure-pgsql
environment:
POSTGRES_DB: default
POSTGRES_USER: default
POSTGRES_PASSWORD: default
volumes:
- pg-data:/var/lib/postgresql/data
redis:
image: library/redis:7.0.5-alpine
container_name: default-structure-redis
restart: always
volumes:
- redis-data:/data
volumes:
pg-data:
redis-data: