-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.example.yml
136 lines (124 loc) · 3.01 KB
/
docker-compose.example.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
133
134
135
136
version: "3"
services:
web:
container_name: metafox-web-frontend
image: bitnami/nginx
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- static_files:/app
- ./nginx-frontend.conf:/opt/bitnami/nginx/conf/server_blocks/app.conf
# - ./certs:/opt/bitnami/nginx/conf/bitnami/certs
networks:
- metafox-app-tier
backend:
container_name: metafox-web-backend
image: bitnami/nginx
restart: always
volumes:
- backend_files:/app:rw
- ./nginx-backend.conf:/opt/bitnami/nginx/conf/server_blocks/app.conf
# - ./certs:/opt/bitnami/nginx/conf/bitnami/certs
ports:
- "8081:8080"
networks:
- metafox-app-tier
app:
image: foxsystem/metafox-fpm:develop
container_name: metafox-app
restart: always
environment:
XDEBUG_TRIGGER: 0
volumes:
- backend_files:/app
depends_on:
- "database"
- "redis"
- "rabbitmq"
networks:
- metafox-app-tier
redis:
container_name: metafox-cache-redis
image: bitnami/redis:latest
restart: unless-stopped
command: /opt/bitnami/scripts/redis/run.sh --protected-mode no
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- "6379:6379"
networks:
- metafox-app-tier
rabbitmq:
container_name: metafox-queue-rabbitmq
image: rabbitmq:3-management
networks:
- metafox-app-tier
database:
image: foxsystem/postgres:13.2
container_name: metafox-db-postgres
restart: always
environment:
POSTGRES_PASSWORD: "${MFOX_DAT_PW}"
POSTGRES_USER: "${MFOX_DAT_USR}"
POSTGRES_DB: "${MFOX_DAT_DBNAME}"
POSTGRES_MAX_CONNECTIONS: 300
POSTGRES_SHARED_BUFFERS: 256MB
volumes:
- ${PWD}/data/postgres:/var/lib/postgresql
ports:
- "5432:5432"
networks:
- metafox-app-tier
queue-worker:
image: foxsystem/metafox-fpm:develop
container_name: metafox-queue-worker
restart: always
environment:
XDEBUG_TRIGGER: 0
volumes:
- backend_files:/app
- static_files:/app/storage/app/frontend_dist
depends_on:
- "database"
- "redis"
- "rabbitmq"
- "app"
networks:
- metafox-app-tier
command: ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
## builder is optional, please refer to build-frontend.sh
# builder:
# build:
# context: docker/frontend-builder
# container_name: metafox-frontend-build
# restart: always
# volumes:
# - frontend_dev:/app
# # - static_files:/dist
# ports:
# - "3002:3002"
# networks:
# - metafox-app-tier
networks:
metafox-app-tier:
driver: bridge
volumes:
static_files:
driver: local
driver_opts:
type: "none"
o: "bind"
device: "${PWD}/public_html"
backend_files:
driver: local
driver_opts:
type: "local"
o: "bind"
device: "${PWD}/backend"
frontend_dev:
driver: local
driver_opts:
type: "none"
o: "bind"
device: ${PWD}/frontend