-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathdocker-compose.yml
80 lines (71 loc) · 1.79 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
version: '3.8'
volumes:
database-volume:
app-volume:
services:
nginx:
build:
context: .
dockerfile: docker/nginx/Dockerfile
restart: unless-stopped
ports:
- '${NGINX_PORT:-80}:80'
volumes:
- 'app-volume:/var/www'
depends_on:
- app
container_name: 'nginx'
app:
build:
context: .
dockerfile: docker/app/Dockerfile
restart: unless-stopped
ports:
- '9000:9000'
volumes:
- 'app-volume:/var/www'
depends_on:
mysqldb:
condition: service_healthy
environment:
APP_URL: ${APP_FULL_URL:-http://localhost}
DB_HOST: ${DB_CONTAINER_NAME:-mysqldb}
DB_DATABASE: ${DB_NAME:-qara}
DB_USERNAME: ${DB_USER:-qara}
DB_PASSWORD: ${DB_PASS:-qarapass}
DB_PORT: ${DB_PORT:-3306}
user: 'www-data:www-data'
command: sh -c "php-fpm"
links:
- mysqldb
container_name: 'app'
mysqldb:
image: 'mysql:8'
environment:
MYSQL_DATABASE: ${DB_NAME:-qara}
MYSQL_USER: ${DB_USER:-qara}
MYSQL_PASSWORD: ${DB_PASS:-qarapass}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS:-root}
command: '--character-set-server=utf8 --collation-server=utf8_general_ci'
restart: unless-stopped
ports:
- '${DB_PORT:-3306}:3306'
volumes:
- 'database-volume:/var/lib/mysql'
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u root --password=${DB_ROOT_PASS:-root}
start_period: 5s
interval: 5s
timeout: 5s
retries: 30
container_name: ${DB_CONTAINER_NAME:-mysqldb}
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- '${PHP_MY_ADMIN_PORT:-8076}:80'
restart: unless-stopped
environment:
PMA_HOST: ${DB_CONTAINER_NAME:-mysqldb}
depends_on:
- mysqldb
container_name: 'phpmyadmin'