-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
91 lines (91 loc) · 2.06 KB
/
docker-compose.yaml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: "3.9"
networks:
backend:
services:
php:
build: "./.docker/php/"
image: php:8.2-apache
container_name: php
ports:
- "80:80"
- "443:443"
volumes:
- type: bind
source: ./php_port/
target: /var/www/html/
networks:
- backend
mysql:
build: "./.docker/mysql/"
image: mysql:latest
container_name: mysql
restart: unless-stopped
environment:
- MYSQL_DATABASE=php_docker
- MYSQL_USER=php_docker
- MYSQL_PASSWORD=password # this should live in a env var
- MYSQL_TCP_PORT=3306
- MYSQL_ALLOW_EMPTY_PASSWORD=1 # equivalent to True
ports:
- "3306:3306"
depends_on:
- php
volumes:
- "./.docker/mysql/persist:/var/lib/mysql" # this is how we persist a sql db even when container stops
networks:
- backend
phpmyadmin:
container_name: phpmyadmin-gui
image: phpmyadmin
ports:
- "8080:80"
restart: always
environment:
- PMA_HOST=mysql
- MYSQL_USER=root
- MYSQL_PASSWORD=
depends_on:
- mysql
networks:
- backend
nodejs:
container_name: nodejs
build: "./.docker/nodejs"
ports:
- "3000:3000"
volumes:
- type: bind
source: ./node_port/
target: /usr/src/app
depends_on:
- mysql
- mongodb
networks:
- backend
mongodb:
container_name: mongodb
build: "./.docker/mongodb"
restart: unless-stopped
ports:
- 27017:27017
environment:
MONGO_INITDB_DATABASE: test
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
volumes:
- ./.docker/mongodb/persist:/data/db
networks:
- backend
mongo-express:
container_name: mongo-express-gui
image: mongo-express
restart: unless-stopped
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: password
ME_CONFIG_MONGODB_URL: mongodb://root:password@mongodb:27017/
ME_CONFIG_BASICAUTH: false
networks:
- backend