-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
100 lines (95 loc) · 2.68 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
100 lines (95 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
services:
frankenphp:
build: .
image: custom-frankenphp:8.5
container_name: frankenphp
restart: unless-stopped
env_file:
- .env
ports:
- "8080:80" # HTTP
- "8443:443" # optional HTTPS
volumes:
- ./wordpress:/app/public
- ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- ./caddy/wordpress.caddyfile:/etc/caddy/Caddyfile.d/wordpress.caddyfile:ro
- ./caddy/opcache.ini:/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini:ro
- caddy_data:/data
- caddy_config:/config
# comment the following line in production, it allows to have nice human-readable logs in dev
tty: true
environment:
SERVER_NAME: ${SERVER_NAME:-localhost}
REDIS_HOST: ${REDIS_HOST:-dragonfly}
REDIS_PORT: ${REDIS_PORT:-6379}
# Run FrankenPHP/PHP as this user so bind-mounted ./wordpress stays host-editable
HOST_UID: ${HOST_UID:-1000}
HOST_GID: ${HOST_GID:-1000}
depends_on:
db:
condition: service_healthy
dragonfly:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/index.php"]
interval: 30s
timeout: 5s
retries: 3
db:
image: mariadb:12
container_name: mariadb
restart: unless-stopped
env_file:
- .env
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE:-franken}
MYSQL_USER: ${MYSQL_USER:-frankenuser}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-frankenpass}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-rootpass}
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
volumes:
- db_data:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: phpmyadmin
restart: unless-stopped
env_file:
- .env
environment:
PMA_HOST: db
# use it if you want to skip the login screen in phpmyadmin
PMA_USER: ${MYSQL_USER:-frankenuser}
PMA_PASSWORD: ${MYSQL_PASSWORD:-frankenpass}
ports:
- "8081:80"
depends_on:
db:
condition: service_healthy
dragonfly:
image: docker.dragonflydb.io/dragonflydb/dragonfly:latest
container_name: dragonfly
restart: unless-stopped
env_file:
- .env
ports:
- "${REDIS_PORT:-6379}:6379"
command: --maxmemory=${DRAGONFLY_MAX_MEMORY:-512mb} --requirepass="" --proactor_threads=1
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
volumes:
- dragonfly_data:/data
volumes:
db_data:
dragonfly_data:
caddy_data:
caddy_config: