-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
132 lines (122 loc) · 2.5 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
version: '3.9'
services:
backend:
container_name: 'backend'
build:
context: ./backend
dockerfile: Dockerfile
environment:
DB_HOST: mysql
DB_DATABASE: laravel
DB_USERNAME: root
DB_PASSWORD: password
ports:
- 8000:8000
depends_on:
- mysql
networks:
- app
frontend:
container_name: 'frontend'
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NODE_ENV=production
command: npm start
networks:
- app
postgres:
container_name: "postgres"
image: postgres:latest
volumes:
- "./docker/volumes/postgres:/var/lib/postgres"
environment:
- POSTGRES_DB=laravel
- POSTGRES_USER=root
- POSTGRES_PASSWORD=password
ports:
- "5432:5432"
networks:
- app
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DB_USERNAME}" ]
retries: 3
timeout: 5s
phppgadmin:
container_name: 'phppgadmin'
image: 'dpage/pgadmin4'
environment:
PGADMIN_DEFAULT_EMAIL: '[email protected]'
PGADMIN_DEFAULT_PASSWORD: 'password'
ports:
- 8083:80
depends_on:
- postgres
networks:
- app
mysql:
container_name: 'mysql'
image: mysql:8.0
environment:
MYSQL_DATABASE: laravel
MYSQL_USER: root
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
ports:
- 8889:3306
volumes:
- ./docker/volumes/mysql:/var/lib/mysql
networks:
- app
phpmyadmin:
container_name: 'phpmyadmin'
image: phpmyadmin
environment:
PMA_HOST: mysql
PMA_PORT: 3306
PMA_ARBITRARY: 1
ports:
- 8080:80
depends_on:
- mysql
networks:
- app
redis:
container_name: 'redis'
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- ./docker/volumes/redis:/data
networks:
- app
rabbitmq:
container_name: rabbitmq
image: 'rabbitmq:management'
ports:
- '5672:5672'
- '15672:15672'
environment:
RABBITMQ_DEFAULT_USER: '${RABBITMQ_DEFAULT_USER:-admin}'
RABBITMQ_DEFAULT_PASS: '${RABBITMQ_DEFAULT_PASS:-password}'
networks:
- app
networks:
app:
driver: bridge
volumes:
mysql:
driver: local
driver_opts:
type: none
o: bind
device: ./docker/volumes/mysql
redis:
driver: local
driver_opts:
type: none
o: bind
device: ./docker/volumes/redis