-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
124 lines (118 loc) · 3.17 KB
/
docker-compose.yml
File metadata and controls
124 lines (118 loc) · 3.17 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
115
116
117
118
119
120
121
122
123
124
version: '3.8'
services:
web:
build:
context: .
dockerfile: Dockerfile.php
container_name: oem-activation-web
restart: always
ports:
- "8080:80"
- "8443:443"
volumes:
- ./FINAL_PRODUCTION_SYSTEM:/var/www/html/activate
- ./test-data:/test-data
- ./logs:/var/www/html/activate/logs
- ./backups:/var/www/html/activate/backups
- ./ssl:/etc/apache2/ssl
environment:
- PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT}
- PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE}
- PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE}
- DB_HOST=${DB_HOST}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
- BACKUP_RETENTION_DAYS=${BACKUP_RETENTION_DAYS}
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
- REDIS_PASSWORD=${REDIS_PASSWORD}
- CORS_ORIGINS=${CORS_ORIGINS:-}
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
- APP_TIMEZONE=${APP_TIMEZONE:-UTC}
depends_on:
db:
condition: service_healthy
networks:
- oem-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/api/health.php"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
db:
image: mariadb:10.11
container_name: oem-activation-db
restart: always
environment:
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
- MARIADB_DATABASE=${DB_NAME}
- MARIADB_USER=${DB_USER}
- MARIADB_PASSWORD=${DB_PASS}
- MARIADB_AUTO_UPGRADE=1
ports:
- "127.0.0.1:3306:3306"
volumes:
- mariadb-data:/var/lib/mysql
- ./FINAL_PRODUCTION_SYSTEM/database/docker-init:/docker-entrypoint-initdb.d
- ./FINAL_PRODUCTION_SYSTEM/database:/docker-entrypoint-initdb.d/sql
networks:
- oem-network
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
command: >
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
--max_connections=200
--innodb_buffer_pool_size=256M
--innodb_log_file_size=64M
--innodb_flush_log_at_trx_commit=2
--innodb_flush_method=O_DIRECT
redis:
image: redis:7.2-alpine
container_name: oem-activation-redis
restart: always
command: redis-server --requirepass ${REDIS_PASSWORD} --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
- redis-data:/data
networks:
- oem-network
ports:
- "127.0.0.1:6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 10s
timeout: 3s
retries: 5
start_period: 10s
phpmyadmin:
image: phpmyadmin:latest
container_name: oem-activation-phpmyadmin
restart: always
ports:
- "8081:80"
environment:
- PMA_HOST=${DB_HOST}
- PMA_PORT=3306
- UPLOAD_LIMIT=50M
depends_on:
db:
condition: service_healthy
networks:
- oem-network
networks:
oem-network:
driver: bridge
ipam:
config:
- subnet: 172.28.0.0/16
volumes:
mariadb-data:
driver: local
redis-data:
driver: local