-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
114 lines (109 loc) · 2.68 KB
/
docker-compose.yml
File metadata and controls
114 lines (109 loc) · 2.68 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
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
services:
php:
image: c15k02k18/php:8.3-alpine${DEBUG:-}
pull_policy: always
restart: always
tty: true
volumes:
- .:/var/www
- ./docker/php.ini:/usr/local/etc/php/php.ini
networks:
- psfs-network
working_dir: "/var/www"
ports:
- "${HOST_PORT:-8001}:8080"
command: 'php -S 0.0.0.0:8080 -t ./html'
environment:
XDEBUG_CONFIG: "remote_host=localhost"
PHP_IDE_CONFIG: "serverName=PSFSCore"
PHP_TIMEZONE: "${PHP_TIMEZONE:-Europe/Madrid}"
PHP_OPCACHE: "${PHP_OPCACHE:-0}"
depends_on:
- redis
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
php-swoole:
image: c15k02k18/php:8.3-alpine${DEBUG:-}
pull_policy: always
restart: always
tty: true
profiles:
- swoole
volumes:
- .:/var/www
- ./docker/php.ini:/usr/local/etc/php/php.ini
networks:
- psfs-network
working_dir: "/var/www"
ports:
- "${HOST_PORT_SWOOLE:-8011}:8080"
command: >
php /var/www/src/bin/psfs psfs:swoole:start
--host=0.0.0.0
--port=8080
--workers=${PSFS_SWOOLE_WORKERS:-2}
--max-request=${PSFS_SWOOLE_MAX_REQUEST:-1000}
--pid-file=/tmp/psfs-swoole.pid
--log-file=/tmp/psfs-swoole.log
environment:
XDEBUG_CONFIG: "remote_host=localhost"
PHP_IDE_CONFIG: "serverName=PSFSCore"
PHP_TIMEZONE: "${PHP_TIMEZONE:-Europe/Madrid}"
PHP_OPCACHE: "${PHP_OPCACHE:-0}"
PSFS_RUNTIME: "swoole"
depends_on:
- redis
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
redis:
restart: always
image: valkey/valkey:latest
networks:
- psfs-network
command: [
"valkey-server",
"--appendonly", "no",
"--save", "",
"--maxmemory", "256M",
"--maxmemory-policy", "allkeys-lru"
]
healthcheck:
test: [ "CMD-SHELL", "valkey-cli ping | grep PONG" ]
interval: 10s
timeout: 3s
retries: 5
start_period: 5s
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
cpus: 0.5
memory: 256M
db:
image: mysql:8.4
networks:
- psfs-network
environment:
MYSQL_USER: ${MYSQL_USER:-psfs}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-psfs}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-psfs}
MYSQL_DATABASE: ${MYSQL_DATABASE:-psfs}
volumes:
- "psfs-db-data:/var/lib/mysql"
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
interval: 5s
timeout: 5s
retries: 20
networks:
psfs-network:
driver: bridge
volumes:
psfs-db-data: