-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
69 lines (64 loc) · 1.53 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
version: '3.8'
volumes:
db-data:
services:
database:
image: mysql:5.7.44
container_name: mysql
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=php_docker
- MYSQL_PASSWORD=password
- MYSQL_ALLOW_EMPTY_PASSWORD=1 # equivalent to True
# - MYSQL_ROOT_PASSWORD=secret
- MYSQL_TCP_PORT=3306 # default port for mySql
volumes:
# - db-data:/var/lib/mysql
- "./db:/docker-entrypoint-initdb.d" # this is how we persist a sql db even when container stops
restart: always
networks:
- default
db-client:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
ports:
- 8081:80
environment:
- PMA_HOST=database # value is the database service key
- PMA_PORT=3306
depends_on:
- database
networks:
- default
server:
container_name: apache-server
build:
context: ./server
dockerfile: Dockerfile
volumes:
- "./server:/var/www" # Adjust to the path where your Laminas project is located
ports:
- 8080:80
- 443:443 # for future ssl traffic
depends_on:
- database
networks:
- default
# server:
# build:
# context: .
# dockerfile: Dockerfile
# environment:
# - MYSQL_DBHOST=database
# - MYSQL_DBPORT=3306
# - MYSQL_DBUSER=root
# - MYSQL_DBPASS=secret
# #- MYSQL_DBNAME=
# ports:
# - 8080:80
# - 443:443 # for ssl trafic
# depends_on:
# - database
networks:
default:
driver: bridge