-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
105 lines (95 loc) · 1.96 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
version: '3'
services:
nginx:
container_name: nginx
restart: always
image: nginx:1.23.4
ports:
- "80:80"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- code_backend:/var/www/html
depends_on:
- php
networks:
app-network:
php:
container_name: php
restart: always
build:
context: .
dockerfile: docker/php/Dockerfile
user: 1000:1000
privileged: true
volumes:
- code_backend:/var/www/html
- /var/run/docker.sock:/var/run/docker.sock
- /home/raizeno/.ssh:/home/appuser/.ssh
environment:
- DOCKER_HOST=unix:///var/run/docker.sock
working_dir: /var/www/html
command: php-fpm
depends_on:
# - mongodb
- mysql
# - redis
networks:
app-network:
# mongodb:
# container_name: mongodb
# restart: always
# image: mongo:6.0.5
# volumes:
# - mongo_data:/data/db
# networks:
# app-network:
mysql:
container_name: mysql
restart: always
image: mysql:8.0.32
volumes:
- mysql_data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=mysecretpassword
- MYSQL_DATABASE=mydb
- MYSQL_USER=myuser
- MYSQL_PASSWORD=mypassword
networks:
app-network:
# redis:
# container_name: redis
# restart: always
# image: redis:6.2
# networks:
# app-network:
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3.11.13-management
restart: always
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- "5672:5672"
- "15672:15672"
networks:
app-network:
networks:
app-network:
external:
name: app-network
volumes:
docker_socket:
driver: local
driver_opts:
type: none
o: bind
device: /var/run/docker.sock
code_backend:
driver: local
driver_opts:
type: none
device: .
o: bind
mysql_data:
# mongo_data: