forked from codions/revive-adserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (67 loc) · 1.82 KB
/
docker-compose.yml
File metadata and controls
70 lines (67 loc) · 1.82 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
services:
app:
build:
context: .
dockerfile: docker/Dockerfile
args:
- REVIVE_VERSION=5.5.2
container_name: revive-app
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
depends_on:
mysql:
condition: service_healthy
volumes:
# Persistent data volumes
- revive_images:/var/www/html/www/images
- revive_delivery:/var/www/html/www/delivery
- revive_var:/var/www/html/var
# Configuration files (read-only)
- ./docker/nginx/default.conf:/etc/nginx/http.d/default.conf:ro
- ./docker/php/php.ini:/etc/php81/php.ini:ro
- ./docker/php/www.conf:/etc/php81/php-fpm.d/www.conf:ro
ports:
- "${APP_PORT:-8080}:80"
networks:
- revive-network
mysql:
image: mysql:8.0
container_name: revive-mysql
restart: unless-stopped
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-secret}
MYSQL_DATABASE: ${DB_DATABASE:-revive}
MYSQL_USER: ${DB_USERNAME:-revive}
MYSQL_PASSWORD: ${DB_PASSWORD:-secret}
MYSQL_CHARSET: utf8mb4
MYSQL_COLLATION: utf8mb4_unicode_ci
volumes:
- revive_mysql_data:/var/lib/mysql
- ./docker/mysql/init:/docker-entrypoint-initdb.d:ro
ports:
- "${MYSQL_PORT:-3306}:3306"
networks:
- revive-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${DB_ROOT_PASSWORD:-root123}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
volumes:
revive_mysql_data:
driver: local
revive_images:
driver: local
revive_delivery:
driver: local
revive_var:
driver: local
networks:
revive-network:
driver: bridge