-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (51 loc) · 1.39 KB
/
docker-compose.yml
File metadata and controls
54 lines (51 loc) · 1.39 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
version: '3.8'
services:
php:
container_name: smallit_php
build:
args:
user: ${WWW_USER}
context: ./docker/php
restart: always
user: ${WWW_USER}:${WWW_USER}
volumes:
- ./:/var/www/html
depends_on:
- mysql
- redis
mysql:
container_name: smallit_mysql
image: mysql:8
command: mysqld --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
restart: unless-stopped
tty: true
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_ALLOW_EMPTY_PASSWORD: "no"
MYSQL_TCP_PORT: ${DB_PORT}
ports:
- ${DB_EXTERNAL_PORT}:${DB_PORT}
volumes:
- ./docker/mysql/data:/var/lib/mysql
- ./docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
- ./docker/mysql/sql:/docker-entrypoint-initdb.d
nginx:
container_name: smallit_nginx
image: nginx:latest
restart: unless-stopped
ports:
- ${APP_PORT}:80
volumes:
- ./:/var/www/html
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
redis:
container_name: smallit_redis
restart: unless-stopped
image: redis:6.2.6
ports:
- ${REDIS_EXTERNAL_PORT}:${REDIS_PORT}