-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
40 lines (39 loc) · 1.25 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
version: '3.4'
services:
web:
build:
context: .
dockerfile: docker/Dockerfile
container_name: "phr_backend"
depends_on:
- mysql
networks:
- default
links:
- mysql
volumes:
- .:/var/www/html
- ~/.ssh:/root/.ssh
ports:
- "${PUBLIC_PORT}:80"
mysql:
image: mysql
# NOTE: use of "mysql_native_password" is not recommended: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password
# (this is just an example, not intended to be a production configuration)
command: --default-authentication-plugin=mysql_native_password
restart: always
container_name: "phr_mysql"
ports:
- "${MYSQL_PUBLIC_PORT}:3306"
networks:
- default
# volumes:
# - .docker/setup.sql:/docker-entrypoint-initdb.d/setup.sql
env_file:
- .env
environment:
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
MYSQL_DATABASE: "${MYSQL_DATABASE}"
MYSQL_ROOT_HOST: "%"