-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (68 loc) · 1.5 KB
/
docker-compose.yml
File metadata and controls
71 lines (68 loc) · 1.5 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
services:
nginx:
image: nginx:latest
container_name: nginx-proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./app:/var/www/html
ports:
- "80:80"
depends_on:
- php
networks:
- database
php:
build:
context: .
dockerfile: Dockerfile
container_name: php-api
restart: always
volumes:
- ./app:/var/www/html
- ./xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
depends_on:
- mysql
environment:
DB_HOST: mysql
DB_PORT: ${DB_PORT}
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
AUTH_SECRET: ${AUTH_SECRET}
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- database
mysql:
image: mysql:9.2
container_name: database
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_TCP_PORT: ${DB_PORT}
ports:
- "${DB_PORT}:${DB_PORT}"
volumes:
- mysql-data:/var/lib/mysql
- ./database:/var/lib/mysql
networks:
- database
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
restart: always
environment:
PMA_HOST: mysql
PMA_PORT: ${DB_PORT}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
ports:
- "${PHPMYADMIN_PORT}:80"
networks:
- database
volumes:
mysql-data:
networks:
database: