-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (61 loc) · 1.59 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
services:
nginx:
image: nginx:latest
container_name: nginx
restart: always
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
environment:
- NGINX_PORT=${NGINX_PORT}
- BACKEND_HOST=api
- BACKEND_PORT=${SERVER_PORT}
- PGADMIN_HOST=pgadmin
ports:
- ${NGINX_PORT}:${NGINX_PORT}
depends_on:
- api
- redis
mysql:
image: mysql:latest
restart: always
volumes:
- ./mysql-data:/var/lib/mysql
ports:
- "3306:3306"
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --log_bin_trust_function_creators=1
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
container_name: mysql
redis:
container_name: redis
image: redis:latest
restart: always
ports:
- 6379:6379
volumes:
- ./docker/data/redis:/data
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: pma
links:
- mysql
environment:
PMA_HOST: mysql
PMA_PORT: 3306
PMA_ARBITRARY: 1
restart: always
ports:
- "8081:80"
api:
container_name: api
build: .
ports:
- ${SERVER_PORT}:${SERVER_PORT}
volumes:
- .:/var/www
env_file:
- .env
depends_on:
- mysql
- redis