-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
83 lines (79 loc) · 2.5 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
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
name: source-web-console
services:
# https://hub.docker.com/_/redis
redis:
image: redis:alpine
restart: always
command: >
--requirepass ${REDIS_PASSWORD} --maxmemory 128mb --maxmemory-policy allkeys-lru
volumes:
- ./docker/redis/config:/usr/local/etc/redis
- ./docker/redis/database:/data
healthcheck:
test: redis-cli --raw incr ping
retries: 3
timeout: 5s
ports:
- "6379:${REDIS_PORT}"
# https://hub.docker.com/_/mariadb
mariadb:
image: mariadb:latest
restart: always
volumes:
- ./docker/mysql/database:/var/lib/mysql
command: [ "--collation-server=utf8mb4_unicode_ci" ]
environment:
TZ: ${APP_TIMEZONE}
MARIADB_DATABASE: ${DATABASE_NAME}
MARIADB_PORT: ${DATABASE_PORT}
MARIADB_USER: ${DATABASE_USERNAME}
MARIADB_PASSWORD: ${DATABASE_PASSWORD}
MARIADB_INITDB_SKIP_TZINFO: true
MARIADB_RANDOM_ROOT_PASSWORD: 1
healthcheck:
test: healthcheck.sh --su-mysql --connect --innodb_initialized
retries: 3
timeout: 5s
ports:
- "3306:${DATABASE_PORT}"
# https://hub.docker.com/_/phpmyadmin
phpmyadmin:
image: phpmyadmin:latest
restart: always
depends_on:
- mariadb
environment:
PMA_HOST: ${DATABASE_HOST}
PMA_PORT: ${DATABASE_PORT}
PMA_USER: ${DATABASE_USERNAME}
PMA_PASSWORD: ${DATABASE_PASSWORD}
healthcheck:
test: curl -f http://localhost
retries: 3
timeout: 5s
ports:
- "8080:80"
# https://github.com/FlorianLeChat/Source-Web-Console
php:
image: source-web-console
restart: always
develop:
watch:
- action: sync
path: .
target: /var/www/html
depends_on:
- redis
- mariadb
environment:
- WAIT_HOSTS=redis:${REDIS_PORT}, mariadb:${DATABASE_PORT}
healthcheck:
test: curl -f http://127.0.0.1:9000/ 2>&1 | grep "Connection reset by peer" || curl -f http://localhost:8000/
retries: 3
timeout: 5s
build:
context: .
dockerfile: ./docker/Dockerfile.${APP_ENV}
ports:
- "8000:8000"
- "8443:8443/udp"